The following article describes how to use MySQL-Client to connect to MySQL-Server in XAMPP under Ubuntu. If you are interested in the actual operations, you can click to view the following articles. I hope you will have some gains.
XAMPPapache (the most popular WEB server platform on the Unix platform) + MySQL (the best combination with PHP) + PHP + PERL) is a powerful integrated website creation software package. This software package was originally named LAMPP, but in order to avoid misunderstanding, the latest versions were renamed XAMPP. It can be installed and used in Windows, Linux, and Solaris operating systems. It supports multiple languages: English, simplified Chinese, traditional Chinese, Korean, Russian, and Japanese.
XAMPP is green and will not be automatically started upon startup. Even in Linux, I still like green software.
First install MySQL-Client in Ubuntu:
- sudo apt-get install mysql-client
Start mysql in XAMPP:
- sudo /opt/lampp/lampp startmysql
In this case, an error is returned if you connect directly: <-- IWMS_AD_BEGIN -->
- Can't connect to local Mysql server (a powerful database platform on WINDOWS) through socket '/var/run/mysqld. sock' (2)
In Ubuntu, use MySQL-Client to connect to MySQL-Server in XAMPP. solution:
- sudo mkdir /var/run/mysqld
- sudo ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock
Reconnect:
Mysql-u root-p
The connection is connected and the problem is solved.
The above content is an introduction to using MySQL-Client to connect to MySQL-Server in XAMPP under Ubuntu. I hope you will get some benefits.