Vbulletin ERROR 1062 (23000) at line 38766: Duplicate entry - mysql

I have one Vbulettin Forum in RHC Opehshift Servers and I installed one module to backup automatically .
but when I want to import the SQL file to MySQL database i got this error:
ERROR 1062 (23000) at line 38832: Duplicate entry '????????' for key
'tagtext'
So I need to know why this is happened.
The strange thing is when i do export the MySQL database by PHPMYADMIN It works correctly and the database is working on the server ( correct importing to new database),but when I use bash comand like :
mysql -f -u $OPENSHIFT_MYSQL_DB_USERNAME -p$OPENSHIFT_MYSQL_DB_PASSWORD p1resta4shop3 > p1resta4shop3.sql
it's not working!!!?

Open your .sql file in a text editor and try to find that line. Check it's tagtext and see if in .sql file there is another line with that tagtext.
Remove it and try to import again.

Related

Failed to open file, Error 2 - MySQL Import

I'm trying to import a MySQL Database via command line (Terminal). The file's path seems to be correct, but I keep getting an error message that is most likely showing that, the path of the SQL file I'm importing is not correct. Below is the sample of the command line I'm using and the error I'm getting...
NOTE: Linux Server, Centos 7 - MariaDB
source C:/Users/localcomputerUser/SQLFileFolder/SQLFile.sql
source C:/Users/localcomputerUser/SQLFileFolder/SQLFile.sql
Failed to open file 'C:/Users/localcomputerUser/SQLFileFolder/SQLFile.sql
', error: 2
Thanks for your support.

How to ignore error during mysql import operation

My sql version is 5.7.30.
I am trying to import a dump into the database.
However i am getting error in between because of which the processs stop.
I tried using -f, -force also in my command, still it does not work.
Any other way for this. My import should continue even if error occurs.

Errors during import of sql file to MySQL database

I am new to database and have just started to learn MYSQL. I have downloaded a sql file called rating.sql and would like to import it to the MYSQL database installed on the local machine. The operation system is Windows 7. The path for the sql file is:
"E:\rating.sql".
I am using the following commands in the MySQL Command Line Client
mysql>use database_name;
mysql>source E:\rating.sql;
The system gives the following error message:
ERROR 1049 <42000>: Unknown database 'ating.sql'
It is definitely something related to the path. Can anyone explain how this error is generated?Thanks
You have use \ and this is an escape character (omits the immediate following character. So to fix this you can use \ instead.
mysql>resour E:\\rating.sql;
Mysql recognises \r as an escape for a carriage return character.
To make it simpler, could you rename your file to something beginning with another letter...mustn't be b n r t or z...

Error code 13 - on import of sqldump

Am getting following "permissions" error when trying to import an sqldump
Error Code: 1 - Can't create/write to file
'C:\ProgramData\MySQL\MySQL Server 5.5\Data\dealcrm\accessorieslink.MYI'
(Errcode: 13)
I have renamed the data folder and put it back recently.
Have tried giving full control for user "system" on the data folder - this is user
the mysql service is started with
any help welcome
EDIT**
Have also tried adding a folder C:/ProgramData/MySQL/MySQL Server 5.5/Temp/
and added this line to mysql.ini
tmpdir="C:/ProgramData/MySQL/MySQL Server 5.5/Temp/"
after import there are some files in the folder but still get error 13
As per documentation of the error code, in your particular situation, i.e. on Windows, you're most likely lacking a setting of the right temp directory where MySQL can dump tempfiles. Set it as described in the link above and you should be fine.

Error when running Mysql batch file

I have a .sql file on my computer at C:\Users\Owner\Documents\file.sql
(Windows Vista) that just creates a database and a simple table within.
In mysql at the command line i enter
source C:\Users\Owner\Documents\newbie.sql;
the query seems to work ok but just before it shows me the successfully created table it outputs the following errors that seem to be related to how i entered the file name:
ERROR:
Unknown command '\U'.
ERROR:
Unknown command '\O'.
ERROR:
Unknown command '\D'.
ERROR:
Unknown command '\n'.
Pardon the newbie error...whats the fix?
Thanks!
Try using forward slash / in place of back slash \ in file path:
C:/Users/Owner/Documents/newbie.sql
or put it between double quotes (")