given the problems encountered when installing the panel on ubuntu 18.04 I thought this mini-guide could be useful to you! In the first step the correct installation of the pwd mysql root is illustrated, which for the mysql 5.7 bug in the installation remains empty. In the second step, the correction of the xtreamcodes file for the services autostart.
sudo apt-get install mysql-server
sudo systemctl stop mysql
Next, create a /var/run/mysqld directory to be used by MySQL process to store and access socket file:
$ sudo mkdir -p /var/run/mysqld
$ sudo chown mysql:mysql /var/run/mysqld
Once ready manually start MySQL with the following linux command and options:
$ sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
$ [1] 2708
Confirm that the process is running as expected:
$ jobs
[1]+ Running sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
At this stage we are able to access MySQL database without password:
$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20-1ubuntu1 (Ubuntu)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Using the MySQL session first flush privileges:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Next, reset root password. The following commands will reset MySQL root password to 12345: <----- replace 12345 with the pwd you chose to insert
mysql> USE mysql;
Database changed
mysql> UPDATE user SET authentication_string=PASSWORD("12345") WHERE User='root'; <----- replace 12345 with the pwd you chose to insert
Query OK, 0 rows affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 1
mysql> UPDATE user SET plugin="mysql_native_password" WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
Quit MySQL session:
mysql> quit
Bye
Gracefully terminate current mysqld process:
$ sudo killall mysqld
Warning! repeat the command several times until you see that the mysql process has been terminated!
At this point the mysql pwd you chose has been correctly set and you can start mysql:
$ sudo systemctl start mysql
another problem found on ubuntu 18.04 is the failed execution of the file /etc/init.d/xtreamcodes on reboot. To overcome this problem, open the files and replace the content with the following:
#!/bin/bash
### BEGIN INIT INFO
# Provides: xtreamcodes
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/init.d/xtreamcodes if it exist
### END INIT INFO
sleep 2
/home/xtreamcodes/iptv_xtream_codes/start_services.sh
exit 0
save the files and type the following 2 commands:
$ sudo update-rc.d xtreamcodes defaults
$ sudo update-rc.d xtreamcodes enable
at this point the content of the file will be executed whenever the server is restarted!
Edited by @urgodfather . Asking for likes is against the rules and can get you banned.
sudo apt-get install mysql-server
sudo systemctl stop mysql
Next, create a /var/run/mysqld directory to be used by MySQL process to store and access socket file:
$ sudo mkdir -p /var/run/mysqld
$ sudo chown mysql:mysql /var/run/mysqld
Once ready manually start MySQL with the following linux command and options:
$ sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
$ [1] 2708
Confirm that the process is running as expected:
$ jobs
[1]+ Running sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
At this stage we are able to access MySQL database without password:
$ mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20-1ubuntu1 (Ubuntu)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
Using the MySQL session first flush privileges:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
Next, reset root password. The following commands will reset MySQL root password to 12345: <----- replace 12345 with the pwd you chose to insert
mysql> USE mysql;
Database changed
mysql> UPDATE user SET authentication_string=PASSWORD("12345") WHERE User='root'; <----- replace 12345 with the pwd you chose to insert
Query OK, 0 rows affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 1
mysql> UPDATE user SET plugin="mysql_native_password" WHERE User='root';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
Quit MySQL session:
mysql> quit
Bye
Gracefully terminate current mysqld process:
$ sudo killall mysqld
Warning! repeat the command several times until you see that the mysql process has been terminated!
At this point the mysql pwd you chose has been correctly set and you can start mysql:
$ sudo systemctl start mysql
another problem found on ubuntu 18.04 is the failed execution of the file /etc/init.d/xtreamcodes on reboot. To overcome this problem, open the files and replace the content with the following:
#!/bin/bash
### BEGIN INIT INFO
# Provides: xtreamcodes
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/init.d/xtreamcodes if it exist
### END INIT INFO
sleep 2
/home/xtreamcodes/iptv_xtream_codes/start_services.sh
exit 0
save the files and type the following 2 commands:
$ sudo update-rc.d xtreamcodes defaults
$ sudo update-rc.d xtreamcodes enable
at this point the content of the file will be executed whenever the server is restarted!
Edited by @urgodfather . Asking for likes is against the rules and can get you banned.
Last edited by a moderator: