I'm almost through and I got stuck at the General Server Configuration from step 6. As in when I try the 7th step, I receive below error;
mysql> mysql -u admin -p -D EMM_DB <
/usr/local/bin/wso2emm/dbscripts/emm_mysql.sql; ERROR 1064 (42000):
You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'mysql -u admin -p -D EMM_DB <
/usr/local/bin/wso2emm/dbscripts/emm_mysql.sql' at line 1
I assume that the command I'm issuing is incorrect and if someone could clear out the issue.
Database name field, should be joined with the -D and also I would suggest to use UTF8 parameter
mysql> mysql -u admin -p -DEMM_DB --default_character_set=utf8 < /usr/local/bin/wso2emm/dbscripts/emm_mysql.sql;
Related
This question already exists:
Why am I getting the error 1064 (42000) while importing using MariaDB/“mysql shell”?
Closed 5 years ago.
Whenever type mysql -u username [-p password] database_name < tatoeba_database.sql
I get
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use near 'mys
ql -u root tatoeba < tatoeba_database.sql' at line 1
MariaDB [tatoeba]>
Is there another way to do such thing Am I missing something?
P.S. I'm following this article: https://github.com/Tatoeba/tatoeba2/wiki/How-to-install-Tatoeba
Remove [-p password]
mysql -u username -p database_name < tatoeba_database.sql
and enter the password manually
It appears that you type your command in MariaDB prompt (that is, you start mysql client first and then use the command above). It's incorrect. You either need to execute it from the shell prompt, or, if you want to start mysql client first, lose the whole thing and run instead
source tatoeba_database.sql
I try to clone my_db to my_db_clone. I followd this post and this but I get always
ERROR 1064 (42000): You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax
I tried thise but none worked, I get always that error :
mysqldump -u my_user -p my_db | mysql -u backup -pmy_password my_db_clone
mysqldump my_db | mysql my_db_clone;
mysqldump my_db -u my_user -pMy_passwprd > dumpdb.sql;
The mysqldump utility runs in the shell. How are you invoking it? Based on your error message, it appears that you might be trying to run it in the mysql client.
Try it in the shell instead.
I am getting the following error while trying to import the table into database using MySQL on my Ubuntu machine.
Error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p spesh db_hit_type < /var/www/html/spesh.com/public_html/portal/' at line 1
I was using the following command to import the table data.
mysql -u root -p spesh db_hit_type < /var/www/html/spesh.com/public_html/portal/js/db_hit_type.sql;
I think that you try to run this command in MySQL command promt or in some client program. You need to run mysql program from server console, not from mysql console.
In the Command Line I created a database with:
create database mysql;
but when i try to upload a database file with the command:
mysql -u root -p database < dbdump.sql;
i receive a syntax error and i don't understand where i'm wrong
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'mysql
-u root -p database < dbdump.sql' at line 1
confirm you're running the command from a shell and not from mysql.
I recall needing to be in mysql.exe directory when running such commands
remove the spaces around <. Ie, write mysql -u root -p database<dbdump.sql
I know we can dump and restore the complete database. But, I want to know if I have multiple database or schema in one main database then what will be the syntax for that?
My database name is TEST and I tried following syntax:
### Start MySQL Backup ###
#$MYSQLDUMP -Q -u root -p "database TEST" >/usr/db/backup/"database TEST".sql;
$MYSQLDUMP -uroot "database TEST" >/backup/"database TEST"-$NOW-$(date +"%T").sql;
But, it failed with following error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$MYSQLDUMP -uroot "database omertest" >/backup/"database omertest"-$NOW-$(date +' at line 1
If you want only schema then use this command to dump:
MYSQLDUMP -u root -p --no-data TEST >/usr/db/backup/db_backup.sql;