Posts

Showing posts from January, 2018

Set and Check Parameter “autocommit” in MySQL

The autocommit is ON when installed MySQL. Check the parameter: show variables like 'autocommit'; Set the parameter: OFF: SET autocommit=0; set autocommit = 'OFF'; ON: SET autocommit=0; set autocommit = 'ON';

The summary of [with check option] in a sql view

Chinese page: http://1035054540-qq-com.iteye.com/blog/1499430

Change Mysql Password in Ubuntu (Forget Password)

Version: Ubuntu: 14 MySQL: 5.5 1.Change the MYSQL Parameter: sudo vi /etc/mysql/my.cnf 32 # 33 # * Basic Settings 34 # 35 user = mysql 36 pid-file = /var/run/mysqld/mysqld.pid 37 socket = /var/run/mysqld/mysqld.sock 38 port = 3306 39 basedir = /usr 40 datadir = /var/lib/mysql 41 tmpdir = /tmp 42 lc-messages-dir = /usr/share/mysql 43 skip-external-locking Add "skip-grant-tables" 32 # 33 # * Basic Settings 34 # 35 user = mysql 36 pid-file = /var/run/mysqld/mysqld.pid 37 socket = /var/run/mysqld/mysqld.sock 38 port = 3306 39 basedir = /usr 40 datadir = /var/lib/mysql 41 tmpdir = /tmp 42 lc-messages-dir = /usr/share/mysql 43 skip-external-locking 44 skip-grant-tables 2.Restart mysql: sudo service mysql restart 3.Change mysql Password: use mysql describe user; select host, user, password from user; upd