mySQL
| rev 22 | rev 23 | ||||
|---|---|---|---|---|---|
| 95 | .. code-block:: mysql | 95 | .. code-block:: mysql | ||
| 96 | 96 | ||||
| n | 97 | GRANT SELECT, LOCK TABLES ON *.* TO username@localhost IDENTIFIED BY 'passw0rd' | n | 97 | GRANT SELECT, LOCK TABLES ON *.* TO backup_user@localhost; |
| > | ; | ||||
| 98 | 98 | ||||
| 99 | 99 | ||||
| t | t | 100 | Backup all databases into separate files | ||
| 101 | -------------------------------------------------- | ||||
| 102 | |||||
| 103 | .. code-block:: bash | ||||
| 104 | |||||
| 105 | #!/bin/bash | ||||
| 106 | |||||
| 107 | USER="backup_user" | ||||
| 108 | PASSWORD="" | ||||
| 109 | TODAY=`date +%Y-%m-%d` | ||||
| 110 | OUTPUTDIR="/backup/db/$TODAY" | ||||
| 111 | MYSQLDUMP="/usr/bin/mysqldump" | ||||
| 112 | MYSQL="/usr/bin/mysql" | ||||
| 113 | |||||
| 114 | mkdir $OUTPUTDIR | ||||
| 115 | |||||
| 116 | # get a list of databases | ||||
| 117 | databases=`$MYSQL --user=$USER --password=$PASSWORD \ | ||||
| 118 | -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | ||||
| 119 | |||||
| 120 | # dump each database in turn | ||||
| 121 | for db in $databases; do | ||||
| 122 | $MYSQLDUMP --force --opt --user=$USER --password=$PASSWORD \ | ||||
| 123 | --databases $db > "$OUTPUTDIR/$db.sql" | ||||
| 124 | done | ||||
| 125 | |||||
| 126 | Reference: `Backup multiple mysql databases into separate files <http://www.snow | ||||
| > | frog.net/2005/11/16/backup-multiple-databases-into-separate-files/>`_ | ||||
| rev 21 | rev 22 | ||||
|---|---|---|---|---|---|
| 93 | ------------------------------------------------------------ | 93 | ------------------------------------------------------------ | ||
| 94 | 94 | ||||
| t | 95 | .. code-block:: | t | 95 | .. code-block:: mysql |
| 96 | 96 | ||||
| 97 | GRANT SELECT, LOCK TABLES ON *.* TO username@localhost IDENTIFIED BY 'passw0rd' | 97 | GRANT SELECT, LOCK TABLES ON *.* TO username@localhost IDENTIFIED BY 'passw0rd' | ||
| > | ; | > | ; | ||
| rev 20 | rev 21 | ||||
|---|---|---|---|---|---|
| 88 | 88 | ||||
| 89 | mysqladmin -u root -p processlist | 89 | mysqladmin -u root -p processlist | ||
| t | t | 90 | |||
| 91 | |||||
| 92 | Create a read only user for backing up databases | ||||
| 93 | ------------------------------------------------------------ | ||||
| 94 | |||||
| 95 | .. code-block:: | ||||
| 96 | |||||
| 97 | GRANT SELECT, LOCK TABLES ON *.* TO username@localhost IDENTIFIED BY 'passw0rd' | ||||
| > | ; | ||||
| 98 | |||||
| 99 | |||||
| rev 19 | rev 20 | ||||
|---|---|---|---|---|---|
| 52 | 52 | ||||
| 53 | 53 | ||||
| t | t | 54 | Restore database | ||
| 55 | ----------------------- | ||||
| 56 | |||||
| 57 | The following command with restore a database from a backup .sql file | ||||
| 58 | |||||
| 59 | .. code-block:: bash | ||||
| 60 | |||||
| 61 | mysql -u username -p lostquery < lostquery-backup-2012-12-10.sql | ||||
| 62 | |||||
| 63 | |||||
| 64 | |||||
| 54 | Drop user | 65 | Drop user | ||
| 55 | ------------- | 66 | ------------- | ||
| rev 18 | rev 19 | ||||
|---|---|---|---|---|---|
| 69 | DROP DATABASE databasename | 69 | DROP DATABASE databasename | ||
| 70 | 70 | ||||
| t | 71 | d | t | 71 | |
| 72 | 72 | ||||
| 73 | Show the MySQL processlist or list of currently running queries | 73 | Show the MySQL processlist or list of currently running queries | ||
| rev 17 | rev 18 | ||||
|---|---|---|---|---|---|
| 72 | 72 | ||||
| 73 | Show the MySQL processlist or list of currently running queries | 73 | Show the MySQL processlist or list of currently running queries | ||
| t | 74 | ======================================================================= | t | 74 | -------------------------------------------------------------------------- |
| 75 | 75 | ||||
| 76 | .. code-block:: mysql | 76 | .. code-block:: mysql | ||
| rev 16 | rev 17 | ||||
|---|---|---|---|---|---|
| 68 | 68 | ||||
| 69 | DROP DATABASE databasename | 69 | DROP DATABASE databasename | ||
| t | t | 70 | |||
| 71 | d | ||||
| 72 | |||||
| 73 | Show the MySQL processlist or list of currently running queries | ||||
| 74 | ======================================================================= | ||||
| 75 | |||||
| 76 | .. code-block:: mysql | ||||
| 77 | |||||
| 78 | mysqladmin -u root -p processlist | ||||
| rev 15 | rev 16 | ||||
|---|---|---|---|---|---|
| 55 | ------------- | 55 | ------------- | ||
| 56 | 56 | ||||
| t | t | 57 | .. code-block:: sql | ||
| 58 | |||||
| 57 | DROP USER username@localhost | 59 | DROP USER username@localhost | ||
| 60 | |||||
| 61 | |||||
| 62 | |||||
| 63 | Drop database | ||||
| 64 | ------------------------- | ||||
| 65 | |||||
| 66 | |||||
| 67 | .. code-block:: sql | ||||
| 68 | |||||
| 69 | DROP DATABASE databasename | ||||
| rev 14 | rev 15 | ||||
|---|---|---|---|---|---|
| 30 | .. code-block:: mysql | 30 | .. code-block:: mysql | ||
| 31 | 31 | ||||
| n | 32 | create database lostquery | n | 32 | CREATE DATABASE lostquery |
| 33 | 33 | ||||
| t | 34 | Make a user for this database... | t | 34 | Or optionally make Character set utf8 for unicode support |
| 35 | |||||
| 36 | .. code-block:: mysql | ||||
| 37 | |||||
| 38 | CREATE DATABASE lostquery DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unico | ||||
| > | de_ci; | ||||
| 39 | |||||
| 40 | |||||
| 41 | |||||
| 35 | 42 | ||||
| 36 | 43 | ||||
| rev 13 | rev 14 | ||||
|---|---|---|---|---|---|
| 38 | --------------------- | 38 | --------------------- | ||
| 39 | 39 | ||||
| t | 40 | The following command will create a user, create its password, and grant it acce | t | 40 | The following command will create a user with a password and grant all privilege |
| > | ss to a database: | > | s to the user on a particular database: | ||
| 41 | |||||
| 42 | 41 | ||||
| 43 | .. code-block:: mysql | 42 | .. code-block:: mysql | ||
| rev 12 | rev 13 | ||||
|---|---|---|---|---|---|
| 25 | Create database | 25 | Create database | ||
| 26 | ------------------ | 26 | ------------------ | ||
| n | 27 | log into mysql as root:: | n | 27 | log into mysql as root: |
| 28 | 28 | ||||
| 29 | 29 | ||||
| n | 30 | .. code-block :: mysql | n | 30 | .. code-block:: mysql |
| 31 | 31 | ||||
| 32 | create database lostquery | 32 | create database lostquery | ||
| 33 | 33 | ||||
| 34 | Make a user for this database... | 34 | Make a user for this database... | ||
| 38 | --------------------- | 38 | --------------------- | ||
| 39 | 39 | ||||
| n | 40 | The following command will create a user, create its password, and grant it acce | n | 40 | The following command will create a user, create its password, and grant it acce |
| > | ss to a database:: | > | ss to a database: | ||
| 41 | 41 | ||||
| 42 | 42 | ||||
| n | 43 | .. code-block :: mysql | n | 43 | .. code-block:: mysql |
| 44 | 44 | ||||
| t | 45 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'pas | t | 45 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'passw0 |
| > | sw0rd' WITH GRANT OPTION | > | rd' WITH GRANT OPTION | ||
| 46 | 46 | ||||
| 47 | 47 | ||||
| rev 11 | rev 12 | ||||
|---|---|---|---|---|---|
| 28 | 28 | ||||
| 29 | 29 | ||||
| n | 30 | .. code-block:: mysql | n | 30 | .. code-block :: mysql |
| 31 | 31 | ||||
| 32 | create database lostquery | 32 | create database lostquery | ||
| 41 | 41 | ||||
| 42 | 42 | ||||
| t | 43 | t | |||
| 44 | .. code-block:: mysql | 43 | .. code-block :: mysql | ||
| 45 | 44 | ||||
| 46 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'pas | 45 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'pas | ||
| > | sw0rd' WITH GRANT OPTION | > | sw0rd' WITH GRANT OPTION | ||
| rev 10 | rev 11 | ||||
|---|---|---|---|---|---|
| 27 | log into mysql as root:: | 27 | log into mysql as root:: | ||
| 28 | 28 | ||||
| n | n | 29 | |||
| 30 | .. code-block:: mysql | ||||
| 31 | |||||
| 29 | create database lostquery | 32 | create database lostquery | ||
| 30 | 33 | ||||
| 31 | Make a user for this database... | 34 | Make a user for this database... | ||
| 37 | The following command will create a user, create its password, and grant it acce | 40 | The following command will create a user, create its password, and grant it acce | ||
| > | ss to a database:: | > | ss to a database:: | ||
| 38 | 41 | ||||
| t | t | 42 | |||
| 43 | |||||
| 44 | .. code-block:: mysql | ||||
| 45 | |||||
| 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'pas | 46 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'pas | ||
| > | sw0rd' WITH GRANT OPTION | > | sw0rd' WITH GRANT OPTION | ||
| 40 | 47 | ||||
| rev 9 | rev 10 | ||||
|---|---|---|---|---|---|
| 37 | The following command will create a user, create its password, and grant it acce | 37 | The following command will create a user, create its password, and grant it acce | ||
| > | ss to a database:: | > | ss to a database:: | ||
| 38 | 38 | ||||
| t | 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'p@s | t | 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'pas |
| > | sw0rd' WITH GRANT OPTION | > | sw0rd' WITH GRANT OPTION | ||
| 40 | 40 | ||||
| 41 | 41 | ||||
| rev 8 | rev 9 | ||||
|---|---|---|---|---|---|
| t | 1 | http://www.anxietycare.net/ valium %-) http://www.qualityremedy.com/ buy 150 tr | t | 1 | mySQL |
| > | amadol tablets 863607 | ||||
| 2 | ======== | ||||
| 3 | |||||
| 4 | mySQL database information. | ||||
| 5 | |||||
| 6 | .. contents:: | ||||
| 7 | |||||
| 8 | Full-Text Minimum word length | ||||
| 9 | -------------------------------- | ||||
| 10 | |||||
| 11 | |||||
| 12 | 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]:: | ||||
| 13 | |||||
| 14 | ft_min_word_len = 3 | ||||
| 15 | |||||
| 16 | Next we need to restart mysql:: | ||||
| 17 | |||||
| 18 | $ sudo service mysql restart | ||||
| 19 | |||||
| 20 | Last repair the full-text index on the table:: | ||||
| 21 | |||||
| 22 | mysql> REPAIR TABLE table_name QUICK | ||||
| 23 | |||||
| 24 | |||||
| 25 | Create database | ||||
| 26 | ------------------ | ||||
| 27 | log into mysql as root:: | ||||
| 28 | |||||
| 29 | create database lostquery | ||||
| 30 | |||||
| 31 | Make a user for this database... | ||||
| 32 | |||||
| 33 | |||||
| 34 | Create a user | ||||
| 35 | --------------------- | ||||
| 36 | |||||
| 37 | The following command will create a user, create its password, and grant it acce | ||||
| > | ss to a database:: | ||||
| 38 | |||||
| 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'p@s | ||||
| > | sw0rd' WITH GRANT OPTION | ||||
| 40 | |||||
| 41 | |||||
| 42 | Drop user | ||||
| 43 | ------------- | ||||
| 44 | |||||
| 45 | DROP USER username@localhost | ||||
| rev 6 | rev 7 | ||||
|---|---|---|---|---|---|
| t | 1 | mySQL | t | 1 | http://www.anxietycare.net/ valium %-) http://www.qualityremedy.com/ buy 150 tr |
| > | amadol tablets 863607 | ||||
| 2 | ======== | ||||
| 3 | |||||
| 4 | mySQL database information. | ||||
| 5 | |||||
| 6 | .. contents:: | ||||
| 7 | |||||
| 8 | Full-Text Minimum word length | ||||
| 9 | -------------------------------- | ||||
| 10 | |||||
| 11 | |||||
| 12 | 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]:: | ||||
| 13 | |||||
| 14 | ft_min_word_len = 3 | ||||
| 15 | |||||
| 16 | Next we need to restart mysql:: | ||||
| 17 | |||||
| 18 | $ sudo service mysql restart | ||||
| 19 | |||||
| 20 | Last repair the full-text index on the table:: | ||||
| 21 | |||||
| 22 | mysql> REPAIR TABLE table_name QUICK | ||||
| 23 | |||||
| 24 | |||||
| 25 | Create database | ||||
| 26 | ------------------ | ||||
| 27 | log into mysql as root:: | ||||
| 28 | |||||
| 29 | create database lostquery | ||||
| 30 | |||||
| 31 | Make a user for this database... | ||||
| 32 | |||||
| 33 | |||||
| 34 | Create a user | ||||
| 35 | --------------------- | ||||
| 36 | |||||
| 37 | The following command will create a user, create its password, and grant it acce | ||||
| > | ss to a database:: | ||||
| 38 | |||||
| 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'p@s | ||||
| > | sw0rd' WITH GRANT OPTION | ||||
| 40 | |||||
| 41 | |||||
| 42 | Drop user | ||||
| 43 | ------------- | ||||
| 44 | |||||
| 45 | DROP USER username@localhost | ||||
| rev 5 | rev 6 | ||||
|---|---|---|---|---|---|
| t | 1 | e6bOru <a href="http://glkkyqifydug.com/">glkkyqifydug</a>, [url=http://uqvnwcd | t | 1 | mySQL |
| > | kuksq.com/]uqvnwcdkuksq[/url], [link=http://jjuelxedncuw.com/]jjuelxedncuw[/link | ||||
| > | ], http://zoanhzbalqge.com/ | ||||
| 2 | ======== | ||||
| 3 | |||||
| 4 | mySQL database information. | ||||
| 5 | |||||
| 6 | .. contents:: | ||||
| 7 | |||||
| 8 | Full-Text Minimum word length | ||||
| 9 | -------------------------------- | ||||
| 10 | |||||
| 11 | |||||
| 12 | 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]:: | ||||
| 13 | |||||
| 14 | ft_min_word_len = 3 | ||||
| 15 | |||||
| 16 | Next we need to restart mysql:: | ||||
| 17 | |||||
| 18 | $ sudo service mysql restart | ||||
| 19 | |||||
| 20 | Last repair the full-text index on the table:: | ||||
| 21 | |||||
| 22 | mysql> REPAIR TABLE table_name QUICK | ||||
| 23 | |||||
| 24 | |||||
| 25 | Create database | ||||
| 26 | ------------------ | ||||
| 27 | log into mysql as root:: | ||||
| 28 | |||||
| 29 | create database lostquery | ||||
| 30 | |||||
| 31 | Make a user for this database... | ||||
| 32 | |||||
| 33 | |||||
| 34 | Create a user | ||||
| 35 | --------------------- | ||||
| 36 | |||||
| 37 | The following command will create a user, create its password, and grant it acce | ||||
| > | ss to a database:: | ||||
| 38 | |||||
| 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'p@s | ||||
| > | sw0rd' WITH GRANT OPTION | ||||
| 40 | |||||
| 41 | |||||
| 42 | Drop user | ||||
| 43 | ------------- | ||||
| 44 | |||||
| 45 | DROP USER username@localhost | ||||
| rev 3 | rev 4 | ||||
|---|---|---|---|---|---|
| t | 1 | 45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaqjmz</a>, [url=http://pakfhnh | t | 1 | e6bOru <a href="http://glkkyqifydug.com/">glkkyqifydug</a>, [url=http://uqvnwcd |
| > | ydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotqnkbn.com/]ednrbotqnkbn[/link | > | kuksq.com/]uqvnwcdkuksq[/url], [link=http://jjuelxedncuw.com/]jjuelxedncuw[/link | ||
| > | ], http://phvlkkcscupb.com/45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaqj | > | ], http://zoanhzbalqge.com/ | ||
| > | mz</a>, [url=http://pakfhnhydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotqn | ||||
| > | kbn.com/]ednrbotqnkbn[/link], http://phvlkkcscupb.com/45Yp5B <a href="http://sw | ||||
| > | xyuwkaqjmz.com/">swxyuwkaqjmz</a>, [url=http://pakfhnhydxuo.com/]pakfhnhydxuo[/u | ||||
| > | rl], [link=http://ednrbotqnkbn.com/]ednrbotqnkbn[/link], http://phvlkkcscupb.com | ||||
| > | /45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaqjmz</a>, [url=http://pakfhn | ||||
| > | hydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotqnkbn.com/]ednrbotqnkbn[/lin | ||||
| > | k], http://phvlkkcscupb.com/45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaq | ||||
| > | jmz</a>, [url=http://pakfhnhydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotq | ||||
| > | nkbn.com/]ednrbotqnkbn[/link], http://phvlkkcscupb.com/ | ||||
| rev 1 | rev 2 | ||||
|---|---|---|---|---|---|
| t | 1 | mySQL | t | 1 | 45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaqjmz</a>, [url=http://pakfhnh |
| > | ydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotqnkbn.com/]ednrbotqnkbn[/link | ||||
| > | ], http://phvlkkcscupb.com/45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaqj | ||||
| > | mz</a>, [url=http://pakfhnhydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotqn | ||||
| > | kbn.com/]ednrbotqnkbn[/link], http://phvlkkcscupb.com/45Yp5B <a href="http://sw | ||||
| > | xyuwkaqjmz.com/">swxyuwkaqjmz</a>, [url=http://pakfhnhydxuo.com/]pakfhnhydxuo[/u | ||||
| > | rl], [link=http://ednrbotqnkbn.com/]ednrbotqnkbn[/link], http://phvlkkcscupb.com | ||||
| > | /45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaqjmz</a>, [url=http://pakfhn | ||||
| > | hydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotqnkbn.com/]ednrbotqnkbn[/lin | ||||
| > | k], http://phvlkkcscupb.com/45Yp5B <a href="http://swxyuwkaqjmz.com/">swxyuwkaq | ||||
| > | jmz</a>, [url=http://pakfhnhydxuo.com/]pakfhnhydxuo[/url], [link=http://ednrbotq | ||||
| > | nkbn.com/]ednrbotqnkbn[/link], http://phvlkkcscupb.com/ | ||||
| 2 | ======== | ||||
| 3 | |||||
| 4 | mySQL database information. | ||||
| 5 | |||||
| 6 | .. contents:: | ||||
| 7 | |||||
| 8 | Full-Text Minimum word length | ||||
| 9 | -------------------------------- | ||||
| 10 | |||||
| 11 | |||||
| 12 | 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]:: | ||||
| 13 | |||||
| 14 | ft_min_word_len = 3 | ||||
| 15 | |||||
| 16 | Next we need to restart mysql:: | ||||
| 17 | |||||
| 18 | $ sudo service mysql restart | ||||
| 19 | |||||
| 20 | Last repair the full-text index on the table:: | ||||
| 21 | |||||
| 22 | mysql> REPAIR TABLE table_name QUICK | ||||
| 23 | |||||
| 24 | |||||
| 25 | Create database | ||||
| 26 | ------------------ | ||||
| 27 | log into mysql as root:: | ||||
| 28 | |||||
| 29 | create database lostquery | ||||
| 30 | |||||
| 31 | Make a user for this database... | ||||
| 32 | |||||
| 33 | |||||
| 34 | Create a user | ||||
| 35 | --------------------- | ||||
| 36 | |||||
| 37 | The following command will create a user, create its password, and grant it acce | ||||
| > | ss to a database:: | ||||
| 38 | |||||
| 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'p@s | ||||
| > | sw0rd' WITH GRANT OPTION | ||||
| 40 | |||||
| 41 | |||||
| 42 | Drop user | ||||
| 43 | ------------- | ||||
| 44 | |||||
| 45 | DROP USER username@localhost | ||||
| empty | rev 1 | ||||
|---|---|---|---|---|---|
| t | t | 1 | mySQL | ||
| 2 | ======== | ||||
| 3 | |||||
| 4 | mySQL database information. | ||||
| 5 | |||||
| 6 | .. contents:: | ||||
| 7 | |||||
| 8 | Full-Text Minimum word length | ||||
| 9 | -------------------------------- | ||||
| 10 | |||||
| 11 | |||||
| 12 | 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]:: | ||||
| 13 | |||||
| 14 | ft_min_word_len = 3 | ||||
| 15 | |||||
| 16 | Next we need to restart mysql:: | ||||
| 17 | |||||
| 18 | $ sudo service mysql restart | ||||
| 19 | |||||
| 20 | Last repair the full-text index on the table:: | ||||
| 21 | |||||
| 22 | mysql> REPAIR TABLE table_name QUICK | ||||
| 23 | |||||
| 24 | |||||
| 25 | Create database | ||||
| 26 | ------------------ | ||||
| 27 | log into mysql as root:: | ||||
| 28 | |||||
| 29 | create database lostquery | ||||
| 30 | |||||
| 31 | Make a user for this database... | ||||
| 32 | |||||
| 33 | |||||
| 34 | Create a user | ||||
| 35 | --------------------- | ||||
| 36 | |||||
| 37 | The following command will create a user, create its password, and grant it acce | ||||
| > | ss to a database:: | ||||
| 38 | |||||
| 39 | GRANT ALL PRIVILEGES ON lostquery.* TO username@localhost IDENTIFIED BY 'p@s | ||||
| > | sw0rd' WITH GRANT OPTION | ||||
| 40 | |||||
| 41 | |||||
| 42 | Drop user | ||||
| 43 | ------------- | ||||
| 44 | |||||
| 45 | DROP USER username@localhost | ||||
Remarkbox