目錄node
MySQL是一種關聯數據庫管理系統,將數據保存在不一樣的表中,而不是將全部數據放在一個大倉庫內,這樣就增長了速度並提升了靈活性。mysql
Mysql是能夠定製的,採用了GPL協議,你能夠修改源碼來開發本身的Mysql系統。linux
rpm -qa|grep -i mysql
rpm -e --nodeps RPM包全名
# cat /etc/passwd | grep mysql
# cat /etc/group | grep mysql
# ps -ef | grep mysql
# /etc/init.d/mysql start
# /etc/init.d/mysql stop
#service mysql start
#service mysql stop
#chkconfig mysql on
設置自動啓動# chkconfig --list | grep mysql
檢查是否設置了自動啓動cp /usr/share/mysql/my-huge.cnf /etc/my.cnf
cp /usr/share/mysql/my-default.cnf /etc/my.cnf
show variables like 'character%';
show variables like '%char%';
ps -ef|grep mysql
路徑 | 解釋 | 備註 |
---|---|---|
/var/lib/mysql/ | mysql數據庫文件的存放路徑 | /var/lib/mysql/atguigu.cloud.pid |
/usr/share/mysql | 配置文件目錄 | mysql.server命令及配置文件 |
/usr/bin | 相關命令目錄 | mysqladmin mysqldump等命令 |
/etc/init.d/mysql | 啓停相關腳本 |
[client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock # 這一行須要設置字符集 default-character-set=utf8 # The MySQL server [mysqld] port = 3306 # 還有這三行 character_set_server=utf8 character_set_client=utf8 collation-server=utf8_general_ci socket = /var/lib/mysql/mysql.sock skip-external-locking key_buffer_size = 384M max_allowed_packet = 1M table_open_cache = 512 sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size = 32M # Try number of CPU's*2 for thread_concurrency thread_concurrency = 8 [mysql] no-auto-rehash # 還有這一行 default-character-set=utf8
#cd /var/lib/mysql/
#ls -1F | grep ^d
mysql> show engines;
show variables like '%storage_engine%';
MyISAM
和InnoDB
xtradb
徹底能夠替代innodb
,而且在性能和併發上作得更好,