Page 1 of 1

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

PostPosted: 10. July 2005 16:21
by neel3333
Hey,

i recently moved to linux Cheers!!! guys for creating a wonderful soft...

On to the question...

the Lampp installed and runs just fine but

when I try to create new db using mysqladmin... it gives an error " Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock (2)


Please help me .. all I need is to create multiple db's for other applications that I want to run using the apache..

Thanks in advance..

Neel

Edit:

I checked the forum and found the following path to start mysql: opt/lampp/bin/mysql

now the error has changd to:

mysql> mysql version;
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 version' at line 1
mysql>


Please help....

Re: Problem ERROR 1064 (42000): You have an error in your SQ

PostPosted: 10. July 2005 21:15
by Dave_L
neel3333 wrote:mysql> mysql version;
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 version' at line 1
mysql>


The error message is correct.

Here's the right way to view the mysql version:

$ /opt/lampp/bin/mysql --version

Update: How to create a db

PostPosted: 11. July 2005 02:38
by neel3333
Thanks for your help...


I am trying to install the application TUTOS from TUTOS.ORG on linux but it requires to setup addition SQL DB. Could you please help me with some of the commands as to how to create the DB and where will it be created.

I tried the following and it went well but not sure if it created the db..

$ /opt/lampp/bin/mysqladmin -h localhost -u root -p password create DBNAME ???


Is that correct? Will create a dB?

If not I need help with the following:
1. create db with passowrd
2. grant all .... identified by password..???

Thanks in advance...

PostPosted: 11. July 2005 05:24
by Dave_L
Unless you really want to learn how to use the commands, it's much easier to use phpMyAdmin: http://localhost/phpmyadmin/