Solution for mysql_upgrade errno: 13

Are you upgrading MySQL, and seeing this?

$ mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck'...
....
Could not create the upgrade info file
   '/usr/local/mysql/data/mysql_upgrade_info'
in the MySQL Servers datadir, errno: 13

Solution — run the script as root (so you’ll have permission to write to mysql_upgrade_info).

Related posts:

  1. HOWTO enable the query log on MySQL on Mac OS X
    Tailing the MySQL query log in real time can be a lifesaver for any developer, and it’s pretty easy to do: Make a file for the mysqld process to write......
  2. Simple MySQL backup to gmail on Ubuntu/Debian
    Backing up your MySQL database (if it’s a reasonable size, like < 100s of MB) can be done with a cronjob that runs mysqldump, gzip, and mpack. First set up......
  3. Apache2, PHP, and MySQL on Mac OS X using MacPorts
    1. Install MacPorts Follow the instructions here: http://www.macports.org/install.php. 2. Install apache2 sudo port install apache2 Note that the macports instructions suggest installing the launchctl script now, but we’ll do that......
  4. Faster MySQL dumps and loads with –tab and –use-threads
    By default, mysqldump writes a series of sql DDL and inserts to standard out, that you can then pipe to another database server to recreate a given database. The problem......

  • Diederick

    Thanks. That helped!

  • Anony

    thanks!