Collection of some MySQL commands, very useful to create and restore MySQL-Backups. [Read more…]
I run a nightly mysqldump of all my databases and one of them has over 500 tables, mysqldumper bring me a error while processing this huge database: [Read more…]
Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Dabian has a own way to login to the MySQL database the credantials are listed in a file:
1 2 3 4
cat /etc/mysql/debian.cnf [...] user = debian-sys-maint password = bodCNLUx0GGYm6F
mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'bodCNLUx0GGYm6F' WITH GRANT OPTION;
By the way set a new root passwort:
mysqladmin -u root password 'new-password'
Sometimes you need a good reference, and this is one of those times. MySQL’s perror command returns many error codes, and I’ve provided a listing here. To find errors individually, just run:
# perror 28 OS error code 28: No space left on device
Sometimes if I work with really huge MySQL databases, I miss the progress bar of the restore progress.
I found a little solution to see the progress
pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.
pv database.sql | mysql -D databasename -pyourpassword 948.4MB 0:00:03 [22.7MB/s] [=====> ] 21% ETA 0:00:11