The index field is too long,
1. Modify the Field Length
2. Modify the default storage engine of mysql.
Add default-storage-engine = INNODB under [mysqld] of/etc/mysql/my. cnf
However, the INNODB engine must be used for database creation.
SQL code
Copy codeThe Code is as follows:
Create table 'acs '(
...
) ENGINE = InnoDB default charset = utf8;
Check the current engine
Copy codeThe Code is as follows:
Mysql> show engines;
No InnoDB
Check whether dynamic loading is supported. The important line is have_dynamic_loading. If YES, continue.
Copy codeThe Code is as follows:
Mysql> show variables like "have _ % ";
Install plug-ins
Copy codeThe Code is as follows:
Mysql> install plugin innodb soname 'Ha _ innodb. so ';
Mysql> show engines;
The first time I used Mysql to create a database in Mysql, I was very confused with Oracle. Next I will briefly introduce the process of creating a database in Linux Mysql.
# Mysql
> Create user 'bob' @ '% 'identified BY '123456'; // create user bob.
> Grant all privileges on *. * TO 'bob' @ 'localhost' identified by '123 ';
// Set bob to log on locally and assign all permissions to bob, because bob is the administrator!
> Grant all privileges on *. * TO 'bob' @ '% 'identified BY '123 ';
// The user address can be localhost, IP address, machine name, and domain name. You can also use '%' to connect from any address.
> Flush privileges; // refresh authorization
> Create database travel character set utf8 COLLATE utf8_general_ci; // CREATE a DATABASE travel and SET it to utf8 format.
> Quit
# Mysql-uroot-p travel <travel20120410. SQL // For convenience, I directly imported a copy of data. The root password is blank by default, so the database name is directly followed.
# Mysql-ubob-p123456 press ENTER
> Show databases; // view the database
> Select user, host, password from mysql. user; // bob log on to view all existing users
> \ S or SELECT CURRENT_USER (); // view the current user
> Use travel;
> Show tables;
> Show grants; // view your Permissions
> Show grants for dba @ localhost; // view dba Permissions
> Revoke all on *. * from dba @ localhost; // remove the dba permission
> Update user set password = password ("password") where user = 'root' // modify the root password
# Mysqladmin-uroot-p old password new password // modify root password
# Mysql-ubob-pbob-h192.168.19.182 travel // remotely log on to Mysql database 182