日期:2014-05-16 浏览次数:20995 次
sudo apt-get install mysql-server
$mysql -u root
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY "root";
mysql> CREATE DATABASE scott
mysql> GRANT ALL PRIVILEGES ON scott.* TO scott@localhost IDENTIFIED BY "tiger";
mysql> GRANT ALL PRIVILEGES ON scott.* TO scott@"%" IDENTIFIED BY "tiger";
$sudo gedit /etc/mysql/my.cnf
bind-address=127.0.0.1
sudo cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf
default-character-set = utf8
default-character-set = utf8 skip-character-set-client-handshake character-set-server = utf8 collation-server = utf8_general_ci init-connect = SET NAMES utf8
default-storage-engine = innodb