Setting a username for MySQL

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
tlfeet
Forum Newbie
Posts: 9
Joined: Tue Mar 18, 2003 2:57 pm

Newbie needs help!

Post by tlfeet »

Ok so I start mysql
then type, at mysql>mysqladmin -u root new_password;

With the semi-colon at end I get:
You have an error in your SQL syntax near 'mysqladmin -u root password new_password' at line 1

What's my error?

If I leave off the semi-colon:
mysql>mysqladmin -u root new_password
and hit return I get:
->
(that is an indented hypen followed bythe greater than sign) which I believe is just continuation prompt
Please help!
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

"mysql>" :arrow: you're already in mysql
"mysqladmin -u root password new_password" is supposed to be entered at the commandline not in mysql.
tlfeet
Forum Newbie
Posts: 9
Joined: Tue Mar 18, 2003 2:57 pm

Post by tlfeet »

Thanks volka
It worked
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Command line suxs. :wink:

http://www.phpMyAdmin.net
tlfeet
Forum Newbie
Posts: 9
Joined: Tue Mar 18, 2003 2:57 pm

phpmyadmin

Post by tlfeet »

Oromain;
I agree, however, I am following directions (figure it can't hurt :D ) and wanted to make sure stuff worked at command line level before installing phpmyadmin
I figure if not working at command line and I install phpmyadmin then I have 2 layers of stuff to figure out where the problem lies, i.e. install of mysql and/or install/config of phpmyadmin.

Being newbie & following directions, did not realize I had to get out of mysql before changing/setting password.
tlfeet
Forum Newbie
Posts: 9
Joined: Tue Mar 18, 2003 2:57 pm

Follow up

Post by tlfeet »

Just to let you know, your help worked!
Have Apache, PHP, MySQL, phpMyAdmin and a website template program called phpWebSite

Thanks a ton!
Post Reply