1. Open the terminal type:
sudo apt-get updata
Enter the root user password
2. When the update is complete, enter
sudo apt-get install mysql-server
After you set a password, enter the password ubuntu14.04 will install the middle click OK (mysql123)
3. After installation is complete, view the port number is open
netstat -tan | grep 3306
The default is port 3306 mysql, if the monitor display to indicate a successful installation.
4. modify the configuration file, to allow a remote user who logs in the database
sudo gedit /etc/mysq/my.cnf
After entering the root password, found in the [mysqld] below
bind-address = 127.0.0.1
After commenting out the sentence, save the file and exit
5. Confirm configuration and restart mysql
Into the mysql:
mysql -uroot -pmysql123
Enter the password to enter mysql
grant all privileges on *.* to 'root'@'% ' identified by 'mysql123' with grant option;
After confirming input
flush privileges;
Then quit: quit
6. mysql configuration kanji character encoding utf-8
In the terminal input sudo gedit /etc/mysql/my.cnf
Find [mysqld] in the file
In the downlink the following configurations:
character-set-server = utf-8
skip-name-resolve
7. Restart mysql
sudo service mysql restart
8. Verify that the success of the character set
Enter mysql: mysql -uroot -pmysql123
输入:show variables like ‘%character%’;
Check whether the character set is utf-8 appears
9.quit exit, the installation is complete.