Skip to main content
Commonmark migration
Source Link

I am facing problem restoring a MySQL database. My primary database was MySQL 5.1 and now I am trying to copy it to MySQL 5.5. The database was backed up by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, MySQL version is: 5.5.32-0ubuntu0.12.04.1-log.

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysql user.

drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base 

Now when I start the MySQL server I get this error:

[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only

I have given a try as follows:

  1. Even tried installing MySQL 5.1 to see if that was the issue.

    Even tried installing MySQL 5.1 to see if that was the issue.

  2. tried chcon mysql_db_t to change the context but it gives me:

    tried chcon mysql_db_t to change the context but it gives me:

    can't apply partial context to unlabelled file

  3. I have used --skip-grant to get into database, but using this I can only access InnoDB tables only, MyISAM tables throw read-only error.

  4. After --skip-grant, I have used upgrade_mysql. This throws me errors stating that many tables are read-only.

  5. I have removed AppArmor too. And restarted too.

  6. I have restored a different database (5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues.

can't apply partial context to unlabelled file

  1. I have used --skip-grant to get into database, but using this I can only access InnoDB tables only, MyISAM tables throw read-only error.
  2. After --skip-grant, I have used upgrade_mysql. This throws me errors stating that many tables are read-only.
  3. I have removed AppArmor too. And restarted too.
  4. I have restored a different database (5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues.

Can some please point me in right direction? I am not sure whats wrong with permissions.

I am facing problem restoring a MySQL database. My primary database was MySQL 5.1 and now I am trying to copy it to MySQL 5.5. The database was backed up by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, MySQL version is: 5.5.32-0ubuntu0.12.04.1-log.

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysql user.

drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base 

Now when I start the MySQL server I get this error:

[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only

I have given a try as follows:

  1. Even tried installing MySQL 5.1 to see if that was the issue.
  2. tried chcon mysql_db_t to change the context but it gives me:

can't apply partial context to unlabelled file

  1. I have used --skip-grant to get into database, but using this I can only access InnoDB tables only, MyISAM tables throw read-only error.
  2. After --skip-grant, I have used upgrade_mysql. This throws me errors stating that many tables are read-only.
  3. I have removed AppArmor too. And restarted too.
  4. I have restored a different database (5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues.

Can some please point me in right direction? I am not sure whats wrong with permissions.

I am facing problem restoring a MySQL database. My primary database was MySQL 5.1 and now I am trying to copy it to MySQL 5.5. The database was backed up by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, MySQL version is: 5.5.32-0ubuntu0.12.04.1-log.

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysql user.

drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base 

Now when I start the MySQL server I get this error:

[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only

I have given a try as follows:

  1. Even tried installing MySQL 5.1 to see if that was the issue.

  2. tried chcon mysql_db_t to change the context but it gives me:

    can't apply partial context to unlabelled file

  3. I have used --skip-grant to get into database, but using this I can only access InnoDB tables only, MyISAM tables throw read-only error.

  4. After --skip-grant, I have used upgrade_mysql. This throws me errors stating that many tables are read-only.

  5. I have removed AppArmor too. And restarted too.

  6. I have restored a different database (5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues.

Can some please point me in right direction? I am not sure whats wrong with permissions.

added 29 characters in body; edited tags; edited title
Source Link
Mat
  • 10.3k
  • 4
  • 44
  • 40

Mysql MySQL gives me:“Can't open and lock privilege tables: Table 'host' is read only”

I am facing problem restoring the mysqla MySQL database. My primary database was mysql5MySQL 5.1 and now I am trying to copy it to mysql5MySQL 5.5. The database was backed up by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, mysqlMySQL version is  : 5.5.32-0ubuntu0.12.045.5.32-0ubuntu0.12.04.1-log.1-log

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnfmy.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysqlmysql user. drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base

drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base 

Now when I start the mysqlMySQL server I get this error "[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only"

[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only

I have given a try as follows:

  1. Even tried installing mysql5MySQL 5.1 to see if that was the issue.
  2. tried 'chcon mysql_db_t'chcon mysql_db_t to change the context but it gives me "can't apply partial context to unlabelled file"
  3. I have used --skip-grant to get into database, but using this I can only access innodb tables only, MyIsam tables throw read-only error
  4. After --skip-grant, I have used upgrade_mysql this throws me error that many tables are read-only.
  5. I have removed apparmor too. and restarted too.
  6. I have restored a different database(5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues. Can some please point me in right direction, I am not sure whats wrong with permissions.:

can't apply partial context to unlabelled file

  1. I have used --skip-grant to get into database, but using this I can only access InnoDB tables only, MyISAM tables throw read-only error.
  2. After --skip-grant, I have used upgrade_mysql. This throws me errors stating that many tables are read-only.
  3. I have removed AppArmor too. And restarted too.
  4. I have restored a different database (5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues.

ThanksCan some please point me in advanceright direction? I am not sure whats wrong with permissions.

Mysql gives me:“Can't open and lock privilege tables: Table 'host' is read only”

I am facing problem restoring the mysql database. My primary database was mysql5.1 and now I am trying to copy it to mysql5.5. The database was backed by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, mysql version is  : 5.5.32-0ubuntu0.12.04.1-log

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysql user. drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base

Now when I start the mysql server I get this error "[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only"

I have given a try as follows:

  1. Even tried installing mysql5.1 to see if that was the issue.
  2. tried 'chcon mysql_db_t' to change the context but it gives me "can't apply partial context to unlabelled file"
  3. I have used --skip-grant to get into database, but using this I can only access innodb tables only, MyIsam tables throw read-only error
  4. After --skip-grant, I have used upgrade_mysql this throws me error that many tables are read-only.
  5. I have removed apparmor too. and restarted too.
  6. I have restored a different database(5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues. Can some please point me in right direction, I am not sure whats wrong with permissions.

Thanks in advance.

MySQL gives me:“Can't open and lock privilege tables: Table 'host' is read only”

I am facing problem restoring a MySQL database. My primary database was MySQL 5.1 and now I am trying to copy it to MySQL 5.5. The database was backed up by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, MySQL version is: 5.5.32-0ubuntu0.12.04.1-log.

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysql user.

drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base 

Now when I start the MySQL server I get this error:

[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only

I have given a try as follows:

  1. Even tried installing MySQL 5.1 to see if that was the issue.
  2. tried chcon mysql_db_t to change the context but it gives me:

can't apply partial context to unlabelled file

  1. I have used --skip-grant to get into database, but using this I can only access InnoDB tables only, MyISAM tables throw read-only error.
  2. After --skip-grant, I have used upgrade_mysql. This throws me errors stating that many tables are read-only.
  3. I have removed AppArmor too. And restarted too.
  4. I have restored a different database (5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues.

Can some please point me in right direction? I am not sure whats wrong with permissions.

Source Link
Praveen
  • 21
  • 1
  • 1
  • 2

Mysql gives me:“Can't open and lock privilege tables: Table 'host' is read only”

I am facing problem restoring the mysql database. My primary database was mysql5.1 and now I am trying to copy it to mysql5.5. The database was backed by using Xtrabackup.

I am using Ubuntu 12.04.3 LTS on this server, mysql version is : 5.5.32-0ubuntu0.12.04.1-log

I have followed all the steps to restore using Xtrabackup, this created database files, which I have copied to a tmp directory.

I have modified my.cnf to point to this tmp directory. I have changed the tmp directory permissions and changed the ownership of the files to mysql user. drwxr-xr-x 12 mysql mysql 4096 Sep 10 10:04 base

Now when I start the mysql server I get this error "[ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only"

I have given a try as follows:

  1. Even tried installing mysql5.1 to see if that was the issue.
  2. tried 'chcon mysql_db_t' to change the context but it gives me "can't apply partial context to unlabelled file"
  3. I have used --skip-grant to get into database, but using this I can only access innodb tables only, MyIsam tables throw read-only error
  4. After --skip-grant, I have used upgrade_mysql this throws me error that many tables are read-only.
  5. I have removed apparmor too. and restarted too.
  6. I have restored a different database(5.1 to 5.5) previously on Ubuntu 12.04.2 LTS without any issues. Can some please point me in right direction, I am not sure whats wrong with permissions.

Thanks in advance.