mysql> Help with commands

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

mysql> Help with commands

Post by mhouldridge »

Hi,

I am running mysql version 5 and have also installed the command line tool. I have successfully entered inserting my password when prompted, however when presented with the following;

mysql>

Commands taken from the mysql website are not working such as;

mysql>FLUSH TABLES WITH READ LOCK;

This just gives me a syntax error.


Please help!
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

post the error/s....
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

error 1064 (42000): you may have an error in your sql syntax.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

I ran the flush commands in mysql 4, it works fine here. Do you problem/s with any other command/s?
EDIT: error 1064 actually stands for different syntax errors which I came to infer from forums in mysql.com
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

I recently moved a pretty big app over to MySQL 5.. I went straight back to 4.. 5 has sooo many problems right now, stick with 4 and move to 5 when its more mature.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

ody wrote:I recently moved a pretty big app over to MySQL 5.. I went straight back to 4.. 5 has sooo many problems right now, stick with 4 and move to 5 when its more mature.
I too switched from 4 to 5 for a forum website but it worked when I just moved the db folder in data directory. Often, it won't be a problem if you take proper backups as SQL and run them on the new version. Can you share with us what kind of problems you came up with?

There are aplenty reasons to use mysql 5, some are views, triggers and procedures.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

I have removed version 5, and downgraded to 4.1

I am trying to follow a tutorial on the internet on how to set up replication.

The tutorial starts with....

First we have to edit /etc/mysql/my.cnf. We have to enable networking for MySQL, and MySQL should listen on all IP addresses, therefore we comment out these lines (if existant):

#skip-networking#bind-address = 127.0.0.1

------------------------------------------------------------------------------

I cant find this folder, any ideas?
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

I do not know about Linux but in Windows the default installation path is c:/program files/mysql 4 or 5/ which is the installation directory and you should be able to find a lot of configuration files but this one is my.cnf.
ody
Forum Contributor
Posts: 147
Joined: Sat Mar 27, 2004 4:42 am
Location: ManchesterUK

Post by ody »

raghavan20 wrote:
ody wrote:I recently moved a pretty big app over to MySQL 5.. I went straight back to 4.. 5 has sooo many problems right now, stick with 4 and move to 5 when its more mature.
I too switched from 4 to 5 for a forum website but it worked when I just moved the db folder in data directory. Often, it won't be a problem if you take proper backups as SQL and run them on the new version. Can you share with us what kind of problems you came up with?

There are aplenty reasons to use mysql 5, some are views, triggers and procedures.
The main problems where SQL queries that worked fine in 4 and breaking in 5, granted they where big joins and complex but the MySQL dev team are taking along time fixing these issues which leads me to believe there are majour engineering flaws in the new 5 code base.
User avatar
mhouldridge
Forum Contributor
Posts: 267
Joined: Wed Jan 26, 2005 5:13 am

Post by mhouldridge »

My PHP wont connect now as I am getting authentication issue, I believe relating to the way php version 4 sends its passwords.

I have tried setting the password to old however I get the following error from mysql console;

cant find row in user table.

This error suggests that the user doesnt exist however within mysql admin it is there..... urgh!

Im getting a headache.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

Please post errors with your script..........
Post Reply