I am using MAMP with MySQL server ver 5.5.42.
When I do an Alter table using phpMyAdmin on the MAMP server:
ALTER TABLE config DROP COLUMN 132
I get
#1064 - 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 'config' DROP COLUMN 132' at line 1
Where is the problem ?
Turns out it should be:
ALTER TABLE `config` DROP COLUMN `132`
`--> the accent or backquote character on the tilde key. :|
Related
I try to install fleetspeak. Use Ubuntu 18.04.
First of all I run this
CREATE USER 'fleetspeak-user' IDENTIFIED BY 'fleetspeak-password';
Then I want to create database with this
CREATE DATABASE 'fleetspeak';
But has an 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 ''fleetspeak'' at line 1
Why I can get this?
Try the create database script without single quotes in dbname
CREATE DATABASE fleetspeak;
I am able to create databases and tables using the User Interface in phpMyAdmin , but when I do the same using MySQL commands , It does not work. I get this error :
SQL query:
DROP DATABASE 'alphacrm'
MySQL said: Documentation
1064 - 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 ''alphacrm'' at line 1**
don't use quote
DROP DATABASE alphacrm;
my sql object don't need quotes eventually use backtics for reversed word and compite named eg:
`my obj`
I am trying to transfer data from MySQL 4.0.26 into MySQL 5.5.41-0ubuntu0.12.04.1.
I am making a dump from MySQL 5.5 server via mysqldump it works but when I'm trying to restore it there a problem occures:
ERROR 1064 (42000) at line 20: 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 'TYPE=MyISAM' at line 4
Is there some way how to create compatible dump for MySQL 5.5. from MySQL 4.0?
This should work
mysqldump ... | sed 's/TYPE=/ENGINE=/g' | > dump_file
(...and be enough. In the link Jens posted, there's another substitute for timestamp(14), but MySQL does this automatically, if I'm not mistaken.)
I'm trying to restore database from backup. I've create new DB:
CREATE DATABASE `my_db` CHARACTER SET utf8
after that I launch big sql, afrter some time there written
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 ''oy7:
commandwy24:BroadcastCommandContentsy15:changeStructure:7y7:1080582i15ay7:1' at
line 1
Does anyone know what's up here? I've tried on two backups, and I don't think both are invalid.
Thank you in advance!
I have written the SQL file with on excecuting it is throwing the error as
mysql> #"C:\Documents and Settings\Hemant\Desktop\create_tables.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 '#"C:\
Documents and Settings\Hemant\Desktop\create_tables.sql"' at line 1
on line 1 code is
CREATE DATABASE IF NOT EXISTS test;
DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE test;
please let me know is i am missing something
Correct me if I'm wrong, but isn't there a table test by default when you setup PHPMyAdmin?
You have an extra semi column after test.
Try removing it and see if that fixes the issue.