Trying to restore a database in mariadb on Debian 11

limdim

New Member
Joined
Jul 1, 2022
Messages
1
Reaction score
0
Credits
11
If anyone can assist that'd be great

I'm trying to restore a db on mariadb using this command and get the following error
mysql -u root -p wordpress < all-databases.sql
Enter password:
ERROR 1050 (42S01) at line 805: Table 'user' already exists
any idea?
 


gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
433
Reaction score
509
Credits
4,442
The error is in your script, not in the fact you’re using Debian.

Check in line 805 and if you’re trying to create a table named user, you may have added it before in the script or in a previous try.

You can get past the error adding the clause “IF NOT EXISTS”: “CREATE TABLE user IF NOT EXISTS”,

You should check Mariadb’s documentation.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Latest posts

Top