473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

setting database pw

hi,

i've searched quite a bit, but cant find any post relating to sql
command for setting database passwords. anyone know how? thanks

pk

Nov 23 '05 #1
4 1912
You can only set passwords for user accounts, not for specific databases:

set password for user@host = password('your_password');

Find more detailed information here:
http://dev.mysql.com/doc/refman/5.0/...anagement.html

Markus
Nov 23 '05 #2
thanks for the reply markus.

i was under the same impression, but i set up a wiki on my server and i
noticed that the mysql_connect command the wiki uses doesn't
authenticate with my mysql server password.

when i initally set up the wiki, it asked me to create a pw for the
wiki DB. this pw was not my mysql user pw.

how is it still able to query the wiki db (without my mysql user pw)
then?

i also wrote my own php script and provided the wiki DB pw to the
mysql_connect command. the connection surprisingly also worked.

// case A:
$link = mysql_connect('localhost', 'mysql_user', 'wikiDB_password');
mssql_select_db('[wikiDB]', $link); // success

// case B:
$link = mysql_connect('localhost', 'mysql_user', 'wikiDB_password');
mssql_select_db('[anotherDB]', $link); // fails as expected - didnt
create pw for this DB

i shutdown my wiki and restarted it before trying the above too. how is
this possible? case B makes me think you can set DB specific pw...?

thanks in advance,

pk

Nov 24 '05 #3
On Thu, 24 Nov 2005 14:20:47 -0800, pk_pk wrote:
...case B makes me think you can set DB specific pw...?


Part of the user permissions is which databases can be accessed, and in
what capacity (read-only, update, drop, etc.)


Mike A.
MySQL 5.0.15 on FreeBSD 5.4

Nov 25 '05 #4
thanks markus and mike =) i looked more carefully into the link markus
pasted, and there is mention of "user permissions is which databases
can be accessed" with the "GRANTS" command.
kani

Nov 28 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
1
by: Bob | last post by:
I used Enterprise Manager to change the data type of one table column from one thing to another. When I attempted to save the change, I was warned that "one or more existing columns have...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
4
by: Phil Campaigne | last post by:
Hello, I originally installed postgresql as root user and now I am setting up a development environment with cvs and a java ide and tomcat. I have everything with the exception of postgresql...
10
by: MLH | last post by:
I was wondering if setting object vars to Nothing near the end of a sub procedure was beneficial at all - since they (the OV's) are about to go out-a-scope anyway? For example, Sub MySub()...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: Suresh | last post by:
Hi All, I am using DB2 UDB enterprise server unlimited edition on linux platform. We have completed entire database as well as front end (web application in JSP using JBOSS) development. Its all...
1
by: DavidAM | last post by:
In an application I'm loading a RTF value from a database into a richtextbox. After setting the RTF property of the richtextbox control I notice that this value is different than the database value...
6
by: metaperl | last post by:
I would like to check the setting of this variable in our MS-SQL 2000 database. Also, is there info on what the default value of this variable is?
1
by: kingdombrokers | last post by:
Hello Guru's I am new to db2 and need some help with setting up a new database. So far I have created the database. "DB2 create database" And was sent the .sql file would this be the DDL? At...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.