Error 1064 42000

error 1064 42000

I dont know what I done wrong, but the error is: error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL. Normally, this error is produced when you have an error in your code. As it explicitly states “You have an error in your SQL syntax”. However. You seem to be trying to use Oracle anycodings_mysql syntax with MySQL. MySQL doesn't have sequences, it uses anycodings_mysql the.

Error 1064 42000 - accept. opinion

Viewed 43,159 times



i have installed mysql 8.0.12 into one linux node and when i try to give below grant permission to get access from other nodes, i am getting 42000 error


command issued :



Return results:



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 'IDENTIFIED BY 'secure1t'' at line 1



Any help would be appreciated.



Barmar Barmar answer at 2018-09-17 62



You don't use in queries, it's used in .



GRANT command reference


CREATE USER command reference


* The answers/resolutions are collected from stackoverflow, are licensed under CC BY-SA 4.0

Some Code Answers




More Answers Related Mysql Error 1064 42000 You Have An Error In Your Sql Syntax

Resolve MySQL ERROR 1064 (42000): You have an error in …

1 week ago Jul 30, 2019  · 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 …

Show details

MySQL ERROR 1064 (42000): You have an error in your SQL syntax …

1 week ago Jul 16, 2021  · MySQL error1064 (42000) usually occurs when youhave an error in the query syntax that was executed. One of the reasons that can give you this error is when you are …

Show details

ERROR 1064 (42000): You have an error in your SQL syntax;

1 week ago Mar 04, 2015  · It is varchar and not var_char. CREATE DATABASE IF NOT EXISTS courses; USE courses; CREATE TABLE IF NOT EXISTS teachers( id INT(10) UNSIGNED PRIMARY …

Reviews: 3

Show details

FIX sqlstate 42000 - mysql error 1064 – you have an error …

1 week ago 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 ‘>’$.”en”‘ = ? and `type` is null limit 1’ at line 1 …

Estimated Reading Time: 5 mins

Show details

See also: Mysql Sql

MySQL : ERROR 1064 (42000): You have an error in your …

1 day ago Jan 25, 2022  · MySQL : 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 ...

Author: Knowledge Base
Views: 787

Show details

ERROR 1064 (42000): You have an error in your SQL syntax

2 days ago ORDER is a reserved word in MySQL and in standard SQL as well. If the column name in the table is ORDER, then put backquotes ( ` ) around the word ORDER when using it as a column …

Show details

MySQL :: Re: ERROR 1064 (42000): You have an error in …

3 days ago Jul 21, 2009  · Sorry, you can't reply to this topic. It has been closed. Content reproduced on this site is the property of the respective copyright holders.

Show details

MySQL :: Re: ERROR 1064 (42000): You have an error

1 week ago Jul 21, 2009  · select version(); +-----+ +-------------+

error 1064 (42000) : You have an error in your SQL syntax near to use %s

I dont know what I done wrong, but the error is : 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 ‘%s’

def forget_password_window(self): if self.Mail_address.get()=="": messagebox.showerror("Erreur", "Veuillez rentrer une adresse mail valide.", parent=self.app) else: try: mydb = mysql.connector.connect( host = "localhost", user = "username", password = "pwd", auth_plugin='mysql_native_password', database = "mydb" ) cursor = mydb.cursor() cursor.execute("""SELECT * FROM Employee WHERE employee_address=%s """,(self.Mail_address.get())) row = cursor.fetchone()

I made this code above in my code :

def connexion(self): if self.Mail_address.get()=="" or self.Password.get()=="": messagebox.showerror("Erreur", "Veuillez saisir l'adresse mail et le mot de passe !", parent=self.app) else : try: mydb = mysql.connector.connect( host = "localhost", user = "username", password = "pwd", auth_plugin='mysql_native_password', database = "mydb" ) cursor = mydb.cursor() cursor.execute("""SELECT * from Employee WHERE employee_address=%s and employee_matricule=%s""",(self.Mail_address.get(), self.Password.get())) row = cursor.fetchone()

This code is working. So idk why this code is working and the first one is not. NEED HELP ! THX !

Answer

The MySQL connector needs at least a list of 2 dimensions as parameter

So change your code to

def forget_password_window(self): if self.Mail_address.get()=="": messagebox.showerror("Erreur", "Veuillez rentrer une adresse mail valide.", parent=self.app) else: try: mydb = mysql.connector.connect( host = "localhost", user = "username", password = "pwd", auth_plugin='mysql_native_password', database = "mydb" ) cursor = mydb.cursor() cursor.execute("""SELECT * FROM Employee WHERE employee_address=%s """,(self.Mail_address.get(),)) row = cursor.fetchone()
+-------------+

Solution 5

If by now you don’t want anything to do with or , there is another option.

You can use a subquery like the following to return the same result:

Obviously, the exact query you use will depend on your schema and data.

MariaDBerrors, how to, operators