mySQL
mySQL database information.
Contents
Full-Text Minimum word length
Full-text minimum length default is set to 4. To adjust this setting, edit /etc/mysql/my.cnf and add the following line under [mysqld]:
ft_min_word_len = 3
Next we need to restart mysql:
$ sudo service mysql restart
Last repair the full-text index on the table:
mysql> REPAIR TABLE table_name QUICK
Create database
log into mysql as root:
CREATE DATABASE lostquery
Or optionally make Character set utf8 for unicode support
CREATE DATABASE lostquery DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;
Create a user
The following command will create a user with a password and grant all privileges to the user on a particular database:
GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'passw0rd' WITH GRANT OPTION
Drop user
DROP USER username@localhost
Drop database
DROP DATABASE databasename
Show the MySQL processlist or list of currently running queries
mysqladmin -u root -p processlist
Comments
Leave a comment