1.ubuntu Installing MySQL requires some commands(1) sudo apt-get install mysql-server The following window will appear during installation, requiring the user to enter the relevant database password:
(2)sudo apt-get isntall mysql-client
(3)sudo apt-get install Libmysqlclient-devafter the installation is complete, you can use the following command to check if the installation was successful
sudo netstat-tap | grep mysql
After checking with the above command, if you see a socket with MySQL in the Listen state, the installation is successful. TCP 0 0 Localhost:mysql *:* LISTEN 28385/mysqld
2. Login to MySQL to enter the following command:Mysql-u root-p
Show Databases;show tables;
3. Add some small knowledge in the installation process
1. Delete MySQL
A.sudoApt-get Autoremove--purge mysql-server-5.0
B.sudoApt-get Remove mysql-Server
c.sudoApt-get Autoremove mysql-Server
d.sudoApt-get Remove Mysql-common (very important) in fact, some of the above is redundant, it is recommended to do it in order
2. Clean up residual dataDpkg-l |grep^rc|awk'{print $}'|sudoXargsDpkg-p
3.Start/stop/restart MySQL under Ubuntu3.1 Using service:
sudo service MySQL stopsudo service MySQL startsudo service mysql restart
3.2 Starting with the Mysqld script
Sudo/etc/init.d/mysql Stop
Sudo/etc/init.d/mysql Start
Sudo/etc/init.d/mysql Restart
The restart prompt error is as follows: Rather than invoking init scripts through/etc/init.d, use the service (8) utility, e.g. service MySQL start ... Actually told how to do it: start with sudo service MySQL start
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Install MySQL 5.5 under Ubuntu 14.04