{"revision": {"id": "f23d2bbc-2f95-11f1-a5b5-e86a64d24d78", "node_id": "f23c51d7-2f95-11f1-a39a-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "mySQL\r\n========\r\n\r\nmySQL database information.\r\n\r\n.. contents::\r\n\r\nFull-Text Minimum word length\r\n--------------------------------\r\n\r\n\r\nFull-text minimum length default is set to 4.  To adjust this setting, edit /etc/mysql/my.cnf and add the following line under [mysqld]::\r\n\r\n ft_min_word_len = 3\r\n\r\nNext we need to restart mysql::\r\n\r\n $ sudo service mysql restart\r\n  \r\nLast repair the full-text index on the table::\r\n\r\n mysql> REPAIR TABLE table_name QUICK\r\n\r\n\r\nCreate database\r\n------------------\r\nlog into mysql as root:\r\n\r\n\r\n.. code-block:: mysql\r\n \r\n CREATE DATABASE lostquery\r\n\r\nOr optionally make Character set utf8 for unicode support\r\n\r\n.. code-block:: mysql\r\n \r\n CREATE DATABASE lostquery DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;\r\n\r\n\r\n\r\n\r\n\r\nCreate a user\r\n---------------------\r\n\r\nThe following command will create a user with a password and grant all privileges to the user on a particular database:\r\n\r\n.. code-block:: mysql\r\n\r\n GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'passw0rd' WITH GRANT OPTION\r\n\r\n\r\nDrop user\r\n-------------\r\n\r\n.. code-block:: sql\r\n\r\n DROP USER username@localhost\r\n\r\n\r\n\r\nDrop database\r\n-------------------------\r\n\r\n\r\n.. code-block:: sql\r\n\r\n DROP DATABASE databasename\r\n", "source_format": "rst", "revision_number": 16, "created": 1333270590000}}