Connect MySQL-Server to MySQL-Client

Source: Internet
Author: User

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:

 
 
  1. sudo apt-get install mysql-client  

Start mysql in XAMPP:

 
 
  1. sudo /opt/lampp/lampp startmysql  

In this case, an error is returned if you connect directly: <-- IWMS_AD_BEGIN -->

 
 
  1. 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:

 
 
  1. sudo mkdir /var/run/mysqld  
  2. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.