Speaking of this problem, I am very ashamed. It was in my previous article "Configuring IP address () in Ubuntu7.10" that solved step 2's problem, this causes the problem that mysql cannot be logged on or cannot be installed again. I apologize to you here.
After I configured the ip address, I didn't notice the problem because I didn't use Ubuntu for two days. Yesterday, after I entered the Ubuntu system, I suddenly couldn't connect to mysql. The ERROR message is: ERROR 2002 (HY000 ): can't connect to local MySQL server through socket '/var/lib/mysql. sock '(2 ). I searched the internet and found that there were quite a few users who encountered such problems. However, I tried to solve the problem according to the solutions provided by some people. As a result, I completely deleted mysql from the new software package manager. After deletion, I used the sudo apt-get install mysql-server command in the terminal to install mysql-server. The following problems occurred:
* Stopping MySQL database server mysqld [OK]
* Starting MySQL database server mysqld [fail]
Invoke-rc.d: initscript mysql, action "start" failed.
Dpkg: Error Handling mysql-server-5.0 (-- configure:
The sub-process post-installation script returns Error 1
Dpkg: the mysql-server configuration cannot be continued due to dependency issues:
Mysql-server depends on the mysql-server-5.0; however:
The package mysql-server-5.0 has not been configured.
Dpkg: An error occurred while processing mysql-server (-- configure:
Dependency problem-Not Configured
Processing triggers for libc6...
Ldconfig deferred processing now taking place
An error occurred during processing:
Mysql-server-5.0
Mysql-server
E: Sub-process/usr/bin/dpkg returned an error code (1)
Run the sudo dpkg -- configure-a command to fix the issue. Helpless, I installed in the new, but still not, or appear "mysql-server depends on the mysql-server-5.0; however:
The package mysql-server-5.0 has not been configured. . I checked on the Ubuntu Chinese forum for one afternoon and did not find a solution. Helpless, I made the most unwilling to make the choice: reinstall Ubuntu, install, I first configure the ip address, then install various software, when installed into mysql, still encountered problems. I think this should be related to my ip address.
So I open the terminal and enter the command: sudo gedit/etc/network/interfaces
Then: # auto lo
# Remove "#" before iface lo inet loopback, because "#" is added after me. When the system is installed, there is no "#" in front, it was added when I configured the ip address. Save the settings. Restart
After the system reinstalls mysql, it finds that there is no problem. Now, the problem is solved.