arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to install and run mysql server with phpmyadmin
#1
Hello all experts. please help me i am stuck here. 

sudo service mysql restart


Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
root@kvm-xxxx:~#
root@kvm-xxxx:~# systemctl status mysql.service
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-05-09 06:49:06 EDT; 17s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25216 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

May 09 06:48:36 kvm-xxxx systemd[1]: Starting LSB: Start and stop the mysql databas
May 09 06:48:36 kvm-xxxx mysql[25216]: /etc/init.d/mysql: WARNING: /etc/mysql/my.cn
May 09 06:48:36 kvm-xxxx /etc/init.d/mysql[25246]: [143B blob data]
May 09 06:49:06 kvm-xxxx mysql[25216]: Starting MariaDB database server: mysqld . .
May 09 06:49:06 kvm-xxxx systemd[1]: mysql.service: Control process exited, code=ex
May 09 06:49:06 kvm-xxxx systemd[1]: Failed to start LSB: Start and stop the mysql
May 09 06:49:06 kvm-xxxx systemd[1]: mysql.service: Unit entered failed state.
May 09 06:49:06 kvm-xxxxs systemd[1]: mysql.service: Failed with result 'exit-code'.
lines 1-14/14 (END)
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-05-09 06:49:06 EDT; 17s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 25216 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

May 09 06:48:36 kvm-xxxx systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
May 09 06:48:36 kvm-xxxx mysql[25216]: /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.
May 09 06:48:36 kvm-xxxx /etc/init.d/mysql[25246]: [143B blob data]
May 09 06:49:06 kvm-xxxx mysql[25216]: Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . .
May 09 06:49:06 kvm-xxxx systemd[1]: mysql.service: Control process exited, code=exited status=1
May 09 06:49:06 kvm-xxxx systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
May 09 06:49:06 kvm-xxxx systemd[1]: mysql.service: Unit entered failed state.
May 09 06:49:06 kvm-xxxx systemd[1]: mysql.service: Failed with result 'exit-code'.
~
~
lines 1-14/14 (END)

i unable to install and program phpmyadmin. 
at login page i got this error


#2002 - Connection refused — The server is not responding (or the local server's socket is not correctly configured).

using many many tutorial and ways to fix it but fails 


error Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock

unable to install phpmyadmin due to this error at the time of configuration 


   
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#2
1) phpMyAdmin is a unzip and use application that simply requires a working web server with PHP and a database server to that it can connect to manage it (can even be an external database server). You only need to configure a few things in its config.inc.php file and you are ready to go. Based on your screenshots you have installed phpMyAdmin and it is working.

Well, furthermore with newer versions of MySQL / MariaDB there is a need to create a special user in the datatabase server for phpMyAdmin to manage it as the root login is not longer accepted anywhere other than the direct localhost command line where the server is installed (its a security feature).

2) What is not working is your actual database server as can be seen in your logs and error messages of phpMyAdmin. Why your database server is not working is / might be hinted in the systemctl / journald logs you have provided:
/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.

This might say it is a warning but I would pay way more attention to it. The my.cnf file is the main database server configuration file that is needed to start up and configure the database server. It's even enough to have invalid configuration options in my.cnf and the database server will not work already. Your server seems to have some kind of issues with reading the my.cnf file.

Check if the my.cnf file exists in /etc/mysql and if its permission is set correct.
[Image: zHHqO5Q.png]
#3
(05-09-2021, 11:19 AM)Mashiro Wrote: 1) phpMyAdmin is a unzip and use application that simply requires a working web server with PHP and a database server to that it can connect to manage it (can even be an external database server). You only need to configure a few things in its config.inc.php file and you are ready to go. Based on your screenshots you have installed phpMyAdmin and it is working.

Well, furthermore with newer versions of MySQL / MariaDB there is a need to create a special user in the datatabase server for phpMyAdmin to manage it as the root login is not longer accepted anywhere other than the direct localhost command line where the server is installed (its a security feature).

2) What is not working is your actual database server as can be seen in your logs and error messages of phpMyAdmin. Why your database server is not working is / might be hinted in the systemctl / journald logs you have provided:
/etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See README.

This might say it is a warning but I would pay way more attention to it. The my.cnf file is the main database server configuration file that is needed to start up and configure the database server. It's even enough to have invalid configuration options in my.cnf and the database server will not work already. Your server seems to have some kind of issues with reading the my.cnf file.

Check if the my.cnf file exists in /etc/mysql and if its permission is set correct.

HI @Mashiro
 i got error at any stage while installing mysql server i got this 


dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-community-server
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

if you like i give you anydesk access to sortout it. because i try many many ways to resolve it but fails.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#4
The question is what have you been doing?

What is your server distribution? How did you install the database server?

For most distributions mysql-server is just an alias for mariadb-server as MySQL has been replaced by MariaDB long ago due to licensing issues with the actual MySQL database server by Oracle.

Your error message suggest that you might have different sources for the database server available in your package sources. The package "mysql-community-server" is actually the real MySQL by Oracle in their free community edition. There seems to be a conflict or a few conflicts with the packages.

If you have no database installed on your server I would fully uninstall the packages installed by the database server and install them properly by using the right MariaDB packages. Hence why the exact OS is required.

dpkg... so you must be using Debian / Ubuntu or something based on one of these two?
[Image: zHHqO5Q.png]
#5
(05-09-2021, 11:51 AM)Mashiro Wrote: The question is what have you been doing?

What is your server distribution? How did you install the database server?

For most distributions mysql-server is just an alias for mariadb-server as MySQL has been replaced by MariaDB long ago due to licensing issues with the actual MySQL database server by Oracle.

Your error message suggest that you might have different sources for the database server available in your package sources. The package "mysql-community-server" is actually the real MySQL by Oracle in their free community edition. There seems to be a conflict or a few conflicts with the packages.

If you have no database installed on your server I would fully uninstall the packages installed by the database server and install them properly by using the right MariaDB packages. Hence why the exact OS is required.

dpkg... so you must be using Debian / Ubuntu or something based on one of these two?

i have debian 9 stretch x86_64 
i need mysql and phpmyadmin to run a personal database.
i dont need mariadb. 
i have a small project which i recently do on ubuntu 16.04 and it was done successfully. but not works on my vps. so i have to learn about it.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#6
MariaDB is MySQL. It is a alternative free MySQL database server by a different development entity (MariaDB Foundation). The actual MySQL is owned by Oracle since a few years and Oracle always changes license NOT in favor of the free users because they want people to pay / change to a paid product. So the default shipping MySQL server was changed in Linux distributions to MariaDB.

Debian 9 is out of support since last year but it's in long term support for atleast another year (til 2022-06). Just as a side note.

Send me a private message if you want to give me access to fix this.
[Image: zHHqO5Q.png]
#7
So you didn't get back to me. I guess you found a solution for your issue? Or did you get it working somehow else or somewhere else?
[Image: zHHqO5Q.png]
#8
(05-12-2021, 10:37 AM)Mashiro Wrote: So you didn't get back to me. I guess you found a solution for your issue? Or did you get it working somehow else or somewhere else?

Yes @Mashiro
Here holy Eid Event. and today is second day. and yes i sortout some things and phpmyadmin is now in working condition also php7.2 and php_mysql also working with connection. 
but still my project is not complete successfully so i don't want to close this thread. i need your more help. but these days i am busy with family and friends events and gathering.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
lockThread Closed 


Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
2,135
11-27-2020, 02:53 AM
Last Post: Rehan
2,044
10-07-2020, 07:33 PM
Last Post: deanhills

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting