????2.3.2 ??????Mysql?????
????[root@AY1404 ~]# /etc/init.d/mysql start
?????п?????????′???ERROR??
????Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/bin/mysqld_safe)
???????????
??????????my.cnf??????basedir·??????????? mysqld_safe?????????????????????mysqld_safe???????????
????[root@AY1404 ~]# /usr/bin/mysqld_safe &
????2.3.3 ???????????
????[root@AY1404 ~]# /etc/init.d/mysql start
??????????????£?
????Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
???????????????????????????????????mysql????????root??????????????
???????/usr/bin/mysql_install_db --user=mysql
????2.3.4 ????????
????mysql> show databases;
????+--------------------+
????| Database |
????+--------------------+
????| information_schema |
????| mysql |
????| performance_schema |
????| test |
????+--------------------+
????4 rows in set (0.00 sec)
????????Mysql???????????
????3.1 ???????
???????root???????????-p???????password??????????
????[root@AY1404 ~]#/usr/bin/mysqladmin -u root -p password root123;
????3.2 ???????????????

 

--????????????
/etc/init.d/mysql start
????
service mysql start
--??????????
/etc/init.d/mysql shutdown
????
service mysql stop

????3.3 ?????????

 

(1) show databases; --?г?????????
(2) use databasename; ????????  ?磺use test;
(3) show tables; ?????
(4) describe tablename; ??????????
(5) create database name; ?????????
(6)????????
mysql>rename table table_abc to table_cba;
(7) ?????????????????????????
mysql> LOAD DATA LOCAL INFILE "/opt/dept.txt" INTO TABLE dept;
(8) ????.sql???????????/opt/dept.sql??
mysql>use database;
mysql>source/opt/dept.sql;
(9) ???????
??????????
mysql>mysqldump -u user_name -p password --default-character-set=latin1 database_name > output_database
??????
mysqldump -u user_name -p password database_name tablename   > table_name.sql
?????????
mysqldump -u user_name -p password -d –add-drop-table database_name > database_name.sql
(10)??????
???????
mysqldump -u username -p password  database_name < inputfile.sql

??????????????????????
????Mysql???????????????????????????my.cnf????????2??????á?
????Mysql V5.6??????Щ????????????SHOW VARIABLES LIKE 'perf%';???в????????????
????Mysql????online???http://dev.mysql.com/doc/refman/5.6/en/performance-schema-system-variables.html
????????????2??????С??

 

performance_schema_max_table_instances=200
#performance_schema_max_table_instances default value 12500
table_definition_cache=200
#table_definition_cache default value  1400
table_open_cache=128
#table_open_cache  default value  2000
key_buffer_size = 8M
sort_buffer_size = 8M
query_cache_size= 16M
tmp_table_size=24M
key_buffer_size=20M