wiki:mysql
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | wiki:mysql [2012/11/12 19:17] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== MySQL ====== | ||
+ | |||
+ | MySQL is a widely spread SQL database management system. | ||
+ | |||
+ | ===== Reset the root password ===== | ||
+ | |||
+ | If you have forgotten your MySQL Database password you can reset it the following way. | ||
+ | |||
+ | <code bash> | ||
+ | sudo -i | ||
+ | stop mysql | ||
+ | mysqld --skip-grant-tables & | ||
+ | mysql -u root mysql | ||
+ | UPDATE user SET Password=PASSWORD(' | ||
+ | FLUSH PRIVILEGES; | ||
+ | exit; | ||
+ | killall mysqld | ||
+ | start mysql | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Create a database with a database user ===== | ||
+ | |||
+ | In order to be able to use a database, you need to create: a new database, and a user with access to that database. This section will explain how to create a new database and give a user the appropriate grant permissions. For the purpose of this tutorial, I will explain how to create a database and user for the [[http:// | ||
+ | |||
+ | <code bash> | ||
+ | mysql -u root mysql -p | ||
+ | create database owncloud; | ||
+ | grant usage on owncloud.* to owncloud@localhost identified by ' | ||
+ | grant all privileges on owncloud.* to owncloud@localhost; | ||
+ | exit; | ||
+ | mysql -u owncloud -p' | ||
+ | </ | ||
wiki/mysql.txt · Last modified: 2012/11/12 19:17 by 127.0.0.1