LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-20-2011, 06:30 PM   #16
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled

hi yancek,
i have tried this once,
mysql> update user set password=('chamling') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0

again same problem

# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 
0 members found this post helpful.
Old 10-20-2011, 06:32 PM   #17
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,322

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by paruhang View Post
hi everybody,
when creating database called demo.from following this link http://www.howtoforge.com/quick-n-ea...er-centos-rhel

To Create A New MySQL User To create a new mysql user 'guest' with 'all privileges' on the database 'demo':

mysql > create database demo
mysql >GRANT ALL PRIVILEGES ON demo.* TO 'guest'@'localhost' IDENTIFIED BY 'guest' WITH GRANT OPTION;
mysql> UPDATE user SET Password=PASSWORD('guest') WHERE user='guest';


following above link i was not able to create database demo but i have tried this i was able to create database called demo
mysql > create database demo;
i hope semicolon ';' is missing after demo. if iam not wrong.
Which is it? You WERE able to create the demo database or you WERE NOT?? Without the semicolon, your MySQL commands won't work. And those instructions about granting database permissions to users are valid for any user and any database...you don't have to create a demo database to use that command...just replace "demo.*" with whatever database you're using.
Quote:
Originally Posted by paruhang
i have tried this once,
mysql> update user set password=('chamling') where user='root';
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0

again same problem
# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
As root, just type in "mysql"...also read the man page on the mysql command. If you use the short version (-p), you need to specify the password on the command line, and there CANNOT be a space between the -p and the password.

Last edited by TB0ne; 10-20-2011 at 06:36 PM.
 
Old 10-20-2011, 06:50 PM   #18
paruhang
Member
 
Registered: Aug 2011
Location: /home
Posts: 96

Original Poster
Rep: Reputation: Disabled
http://www.howtoforge.com/quick-n-ea...er-centos-rhel

To Create A New MySQL User To create a new mysql user 'guest' with 'all privileges' on the database 'demo':

mysql > create database demo I HOEP SO AFTER DEMO ; IS MISSING IN THIS PAGE http://www.howtoforge.com/quick-n-ea...er-centos-rhel
mysql >GRANT ALL PRIVILEGES ON demo.* TO 'guest'@'localhost' IDENTIFIED BY 'guest' WITH GRANT OPTION;
mysql> UPDATE user SET Password=PASSWORD('guest') WHERE user='guest';
 
0 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 5.1.6 & MySQL 5.0.34 connectivity test, php-mysql & libmysqlclient_15 kapshure Linux - Newbie 1 08-05-2010 08:11 PM
Slackware guide for AMP Apache MySQL & PHP xushi Slackware 35 05-11-2006 12:18 PM
Mysql & Httpd authentication landenm Linux - Software 3 06-17-2005 03:50 PM
How to uninstall httpd & PHP dhammika Linux - Software 4 04-28-2004 12:30 AM
PHP/MySQL/httpd jefx Linux - Newbie 4 05-27-2003 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration