0 votes
by (1.5k points)

While installing WordPress on localhost using XAMPP, installation process hampered with showing long error. All errors belong to same type of error, read-only table. Following is the first line of error.

WordPress database error: [Can't create table `dbName`.`tblName` (errno: 165 "Table is read only")]

1 Answer

0 votes
by (10.3k points)

This type of error seen when database (MySQL or MariaDB) gone through fatal error. There are various causes too, apart from visible errors. Anyway, solution is simple. You have to delete one line from my.ini

  1. Open XAMPP control panel
  2. Click MySQL > Config > my.ini
    Xampp MySQL my.ini
  3. Locate & delete below line
    innodb_force_recovery = 4
    Xampp > MySQL > my.ini
  4. Restart MySQL module from XAMPP panel via simply pressing Stop & Start button.
  5. Done..!

If still problem persist, verify that the user has sufficient write permission to database. Alternatively, you can replace 4 in the code shown in step No 3 with 1 or 2 or 3.