Size: 1754
Comment:
|
Size: 1754
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 79: | Line 79: |
CategoryCheetSheet | CategoryCheatSheet |
Contents
Backup and restore
Backing up tables:
1 mysqldump -p -c -Q databasename tablename1 tablename2 ... > whatever.sql
Restoring tables:
1 mysql -p databasename < whatever.sql
Creating a user with their own database
Changing passwords
1 SET PASSWORD = PASSWORD('blah');
Changing adminstrator password
Disabling network access
In my.cnf, add to the [mysqld] section:
skip-networking bind-address=127.0.0.1
Flushing the initial database and users
Deleting users
Notes
- When specifying hosts from which users may login, '%' means any host. These have precedence over 'localhost'
Checking configuration without starting up MySQL
1 mysqld --defaults-file=/tmp/new.cnf --verbose --help
Source: Jeremy Zawodny's MySQL and Drizzle Tip: Checking configuration file syntax (faking configtest)