Most of the mysql-admins out there will know phpmyadmin as a very helpful and reliable database administration tool. It’s available in most linux distros, can easily be installed and is for sure a very nice tool. Today I stumbled upon an alternative mysql administration-tool driven by php called chive.
From the project-website you can quickly see, that it already has a vast feature list and doesn’t need to hide after phpmyadmin.
My first impression is absolutely great and i think this tool can drain off phpmyadmin one day, but that’s of course a very subjective opinion.
More screenshots can be found here: http://www.chive-project.com/Screenshots
Once in a while (hopefully not to often) you need to recover the root password of a mysql database. Here is a quick guide how I do this normally:
1. Stop the running database (if it isn’t stopped already)
2. Start the database with the ’skip-grant-tables‘ option
mysqld_safe –skip-grant-tables &
3. Open the mysql console
mysql -u root
4. Set a new password for root (replace yournewpassword with a password of your choice)
mysql> UPDATE user SET Password=PASSWORD('yournewpassword') WHERE user = 'root';
5. Make the changes work immediately
mysql> FLUSH PRIVILEGES;
6. Stop the database again
/path/to/mysql.pid || killall mysqld
7. Start it up again the usual way
That’s it 🙂
As I wrote in the last post i was thinking about migrating back to wordpress. The steps are almost done. I don’t use categories anymore and the few links i had were added manually after the db-migration. What’s still left to do is to look for a nice theme and install some nifty plugins.
Today i tried to insert data to a mysql-database from a sql-dump with phpmyadmin. Although the dumpfile was not so big (1,8M) i got a timeout after about 30 secondes each time I tried it. This timeout is often by webhosters in their PHP installation.
The problem is that the customer (me in this case) is not able to increase this value 🙁 So what to do?
After googling a bit I found the solution: It’s called Bigdump! Wow!!! 🙂
A simple php-script which does all the work for you. Upload this script and the dump via FTP to the webspace and modify all the needed and well documented parameters in bigdump.php (databaseuser, pw, hostname,..)Fire up your browser and go to the location where you put the file and start the import of the data. As the script doesn’t try to insert all data with one single request and instead does more smaller requests by refreshing itself after some time, the PHP timeout will not be reached!
Debian uses a separate user for the maintanance of MySQL. That user is called debian-sys-maint and will be created automatically when you install MySQL. If you accidentally delete that user or import an old dump with the „mysql“ user database, the MySQL init-script will complain with such an error-message:
Access denied for user ‚debian-sys-maint’@’localhost‘ (using password: YES)
In that case you should recreate that user with the following steps:
1. Get the password of the user from /etc/mysql/debian.cnf
2. Login to your mysql-database and execute the following statement (Replace with the real password from the file /etc/mysql/debian.cnf
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION;
Now, everything should be fine again… 🙂