klenwell information services : MysqlAdmin

Revision history for MysqlAdmin


Revision [3042]

Last edited on 2016-07-09 16:54:43 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
Reference: [[http://linuxcommand.org/man_pages/mysqldump1.html | mysqldump Man]]
[[http://forge.mysql.com/tools/tool.php?id=42 | Kill Mysql Queries]] (forge.mysql.com)
Deletions:
Reference: [[http://linuxcommand.org/man_pages/mysqldump1.html mysqldump Man]]
[[http://forge.mysql.com/tools/tool.php?id=42 Kill Mysql Queries]] (forge.mysql.com)


Revision [2270]

Edited on 2012-08-28 14:17:58 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
====Installing MySQL on Debian/Ubuntu====
apt-get update
apt-get install mysql-server mysql-client
Then any language-specific clients, like php5-mysql


Revision [2250]

Edited on 2012-08-20 10:34:31 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
Restore unzipped sql file
mysql -uUSER -p db_name < dumpeddb.sql


Revision [1912]

Edited on 2011-08-10 08:36:46 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
# check privileges
mysql> SELECT * FROM mysql.user WHERE User='crud_user';
~- http://kb.mediatemple.net/questions/788/HOWTO:+GRANT+privileges+in+MySQL
Deletions:
~- http://kb.mediatemple.net/questions/788/HOWTO:+GRANT+privileges+in+MySQL#dv


Revision [1911]

Edited on 2011-08-10 08:34:55 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin_user'@'localhost' WITH GRANT OPTION;
Deletions:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin_user'@'localhost WITH GRANT OPTION;


Revision [1910]

Edited on 2011-08-10 08:34:37 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
====Create Users====
Create different types users and assign privileges
%%(mysql)
# create local user with
mysql> CREATE USER 'admin_user'@'localhost' IDENTIFIED BY 'secret_pw';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'admin_user'@'localhost WITH GRANT OPTION;
# create user with CRUD powers
mysql> CREATE USER 'crud_user'@'%' IDENTIFIED BY 'crud_pw';
mysql> GRANT INSERT, SELECT, UPDATE, DELETE ON some_db TO 'crud_user'@'%'
# create wildcard user with limited powers
mysql> CREATE USER 'read_only'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT SELECT ON some_db TO 'read_only'@'%';
# never forget
mysql> FLUSH PRIVILEGES;
References:
~- http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
~- http://kb.mediatemple.net/questions/788/HOWTO:+GRANT+privileges+in+MySQL#dv


Revision [1758]

Edited on 2010-12-02 18:46:59 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
time bunzip2 < /tmp/DB_NAME-$(date +%Y%m%d).bz2 | mysql -uUSER -p
Deletions:
bunzip2 < /tmp/DB_NAME-$(date +%Y%m%d).bz2 | mysql -uUSER -p


Revision [1757]

Edited on 2010-12-02 18:46:35 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]
Additions:
====Basic Mysqldump====
From linux command line.
Note: ''time'' command will output the time it takes, useful as a benchmark
# backup selected databases
time mysqldump DB_NAME | bzip2 > /tmp/DB_NAME-$(date +%Y%m%d).bz2
# restore
bunzip2 < /tmp/DB_NAME-$(date +%Y%m%d).bz2 | mysql -uUSER -p
Reference: [[http://linuxcommand.org/man_pages/mysqldump1.html mysqldump Man]]
Reference: http://forge.mysql.com/tools/tool.php?id=42
Deletions:
ref: http://forge.mysql.com/tools/tool.php?id=42


Revision [1618]

The oldest known version of this page was created on 2010-10-08 09:50:26 by KlenwellAdmin [Replaces old-style internal links with new pipe-split links.]