mysql安装配置

命令行安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Install the database packages
sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev

# Ensure you have MySQL version 5.5.14 or later
mysql --version


# Pick a MySQL root password (can be anything), type it and press enter
# Retype the MySQL root password and press enter

# Secure your installation
sudo mysql_secure_installation

# Login to MySQL
mysql -u root -p

# Ensure you can use the InnoDB engine which is necessary to support long indexes
# If this fails, check your MySQL config files (e.g. `/etc/mysql/*.cnf`, `/etc/mysql/conf.d/*`) for the setting "innodb = off"
mysql> SET storage_engine=INNODB;

阅读更多