Mysql Password() & Unix Crypt Password...
I am creating a user administration system where system administrator
can activate services for a user, like webspace, a mail account or a
subdomain.
I now want to create a function that creates mysql databases and grant
the right privileges to a user. But the problem is that mysql wants to
have the plaintext password for the user in the "grant ... identified by
'pwd'" field, or in a manual query to update the password in the
mysql.user table with PASSWORD('pwd').
I have another database which holds the passwords for the users, these
password are stored the moment a user signs up and are used to activate
services, for example ssh access to the machine. The stored passwords
are encrypted using crypt(). So for adding a ssh service to a user, I
simply do echo "$user:$pwdhash" | chpasswd -e.
I have chosen crypt because some programs (like proftpd) don't take md5
sums.
The problems is that I don't have the plaintext password. So I cannot
add a mysql db.
So I need to create a user in mysql with a crypt password.
I tried to just "grant all privileges ... identified by 'nothing'"
and then afterwards update the mysql.user table and putt the crypt
password in there but it doesn't work like that.
Does anyone have any idea on how I could fix this, how can I create a
user in mysql without having his plaintext password and only having a
crypt hash of it.
I thought about not only storing a crypt hash, but also an md5 hash and
a mysql PASSWORD() hash.. but I think that's an ugly solution.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Random Password Vs. User Created Password For Site Login
Are there any security issues or other concerns that make one preferable? The client is pushing for user created passwords. I'm mapping out the basic functionality and front-end for a MySQL/PHP back-end that will be completed by a third party. I'm a novice to MySQL but familiar with PHP and their interaction. Mainly looking for anything to support one method over the other.
I Can Connect With Db Password Or Blank Password
I have a password setup for root (% and localhost) in Mysql 5.0.26, I can connect ok no problem. I can also connect with blank password! I know it is checking the password cuz it fails if it's wrong. I'm sure I have only one account as well (tried to delete, recreate, etc... no change) select * from user where user='root'; | localhost | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ... | % | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ... Is there an option to accept blank password!? I have this problem only for root user; Other accounts are fine.
I Changed Root Password But I Can Not Login With Changed Password
I changed the password of root with update user set password=password('newpassword') Then I exited. But when I want to login again , it cannot authenticate the root I should tell you that a hacker had changed my root password before. Because it was not encrypted before.
Using Password In Mysql
I used the below query for setting password. SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd'); After using it I cannot enter into mysql. When I entered mysql.exe, it is not going inside. But when I use mysql.exe -u root, its going inside. I don't know where the password was actually set.
Cannot Set MySQL Password On My Mac
I had an old version of MySql on my Mac. I recently installed the latest version of MySql. I tried to set a password in terminal using the steps shown below, but I get the error message shown below. I don't remember the password for my previous MySQL installation. Welcome to Darwin! localhost:~ helpprob% alias mysql=/usr/local/mysql/bin/mysql localhost:~ helpprob% mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I have also tried: mysqladmin -password <new password> and the same command without the dash before "password." I have also tried searching the MySQL manual and have tried various things that I thought it was recommending, to no avail. In some variations of what I have tried, I get the same error message except the end reads, "password: YES)
Mysql Password
When I launch phpmyadmin I can see a message at the bottom of the page which says : "Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole." So I went into cli mode and changed the root password.(SET PASSWORD FOR root@localhost=PASSWORD('rubberchicken');) When I went into my moodle site I recieved a database error. I had made sure that I amended the config.php file to reflect the password change but to no avail. I then changed the password back to "blank" and everything works again. I have created a test connect page to rule out my application and it does not connect: <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = 'rubberchicken'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'moodle'; mysql_select_db($dbname); ?> I then change the password back to "blank" in my config file and mysql and everything works fine: mysql> set password for root@localhost=password(''); I am really stumped. I have restarted mysql and apache each time and flushed privileges.
How Do I Set A Password For MySQL?
Following the Open CMS installation documentation, I need to enter the following commands at the MySQL command line: use mysql; insert into user values ('localhost', 'opencmsuser', password('XXXXX'), 'N','N','N','N','N','N','N','N','N','N','N','N','N','N'); insert into db values ('localhost', 'opencms', 'opencmsuser', 'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'); flush privileges;
Password For Mysql
I have running 4.0.15 on my server but when I access het database on a external network i dont have to fill in NO password. So everybody can mesh up my database. Can anybody tell me how I must handel so that i can set a password for my database.
MySQL Password
I just installed MySQL on my mac (OS X) and I'm trying to create a db with the following line command (and I get the following output too): [Jeremys-Computer:~] lezniak% mysql -p forum Enter password: ERROR 1045: Access denied for user: 'lezniak@localhost' (Using password: YES) [Jeremys-Computer:~] lezniak% Which says that my password may be incorrect or what? right after I installed MySQL, I put in: /usr/local/mysql/bin/mysqladmin -u root password <MyPassword> where <MyPassword> isn't what i put in, i put in my password. does anyone know what perhaps what the problem is?
MYSQL Password
I have been having problems with password accounts in MySQL. I'm setting up the environment for the first time. from the mysql website the intructions are to set the password on Windows: shell> mysql -u root mysql>SET password ......... My question is where do i access "shell>" to start off the code I have little expreience in writing in the command window so I do apologise if this question is overly remedial
MySQL PASSWORD()
I have a field in my db that I assign a password() function so that when it is sent in from a browser form, i do "select userID, name, password from users where userID=$userID and password=password($password)"... this is just an example, but wondering what mysql uses to encrypt it.would it be better off to just use php's mcrypt or crypt myself? would that be more secure?
Changing MySQL Password
I am trying to learn MySQL and I don't have a clue what my username and password is. I am on win98. I had installed MySQL awhile back and tried re-installing it, but it skips the password / username part. I assume there must be a file I can change in notepad.
Password Protection Using MySQL
i posted a md5 question on another thread which turned into a MySQL question, so i thought i'll post it in here. I am new to this PHP MySQL thing, but i wanted to create a fairly secure login area. Could someone explain to me on how to do this? Also, i have myPHPadmin, but i'm not too certin on how to create tables and put the stuff in it too.
How To Set Up An Admin Password On OS X For MySQL?
I use to use Complete MySQL, I decided to use MySQL from here, just do to the fact of the major bug that C.MySQL contains now... But the problem I am finding with the documentation is that it doesn't explain in OS X, how to create the admin account, and how to give it a password as well..
Default Password Of Mysql
I was checking an already used mysql. I dont think their passwords were changed. What is the default passwords for the users( root, mysql, etc)?
Setting Mysql Password
How do I set the mysql password? Are there separate password for every database I create?
Login Mysql W/out Password
by entering a random string as the Username on the entry page on phpMyAdmin without password, the person will have access to the database, with privilege to edit database but not creating. if someone enters a recognized Username (ie: root), phpMyAdmin will promp for the actual password. the user table in mysql have 2 sets of users (root and another) on 4 rows, both with password set to localhost and % rows. that's all the info I can supply, and my question, obviously, is how to stop random string Usernames from entering the database..?
Password Decryption In MySQL
I am having a problem with the password storing in mySQL. It is something like this . I have a form for my user to change their password and in that form there is an input field called old_password . And in the database the password i stored were all encrypted with the function PASSWORD() in MySql ,so the problem is that i could not make a comparision between the $$old_password and the encrypted password in the database bacause i haven't known the function to decrypt the password in the mySQL database .
Default Password Set In Mysql
Can any one tell me if there is a default password set in mysql when installing it. I am sure that i did not give any password while installation process. To confirm it i installed it many times and different versions as well. I am having following error message: ERROR 1045: Access denied for user: 'ODBC@localhost' (Using password: NO)
MySQL Password In PHP Code
I am not sure using md5 is correct in the code below: [CODE] <?php $Host ="localhost"; $User = "root"; $Password =md5("secretl"); $DBName="NewDatabase"; $TableName="Feedback"; $Link = mysql_connect($Host, $User, $Password) or die("Couldn't make connection: " . mysql_error()); //on failiure, post error message if($db = mysql_select_db($DBName, $Link)) { print "connected to NewDatabase"; } else { die("Couldn't select database:" . mysql_error()); } ?> [/CODE] The error message is as follows: Couldn't make connection: Client does not support authentication protocol requested by server; consider upgrading MySQL client.
Setting Up The MySQL Password
I can't seem to see the page whan I am trying to set up the 'Setting Up the MySQL Password'. I know this is right at the start but all I get when I type in the Web browser http://127.0.0.1/myadmin is the sourcecode and not the actual log in page... I know it's something silly I have done or not done (I have installed the Apache / MySQL / PHP stuff over and over again, but it still does the same thing to me. The Apache services is running fine. The WinMySQLadmin is on green so I know that's fine. I think it's maybe an explorer thing? but I can't seem to get it.
MySQL Password Problem
I installed a new application and it over wrote my passwords.I can not get back in to mysql.Someone suggested there is a way to set the password without knowing the old password.
MySQL Administrator Password
I have just installed mySQL 5 Community Edition and also all its tools viz. Administrator, Migration etc.. Presently I have installed it on a machines with no other machines connected to it. I also selected "Developer Machine" option while installing it. When I open mySQL Administrator, it asks for Username and Password. I remember the password, but what is the default Username and Schema Name. If I am running on a standalone machine, what to type in "Server Host" in the administrator window.
Cannot Connect To MySQL Using Password.
username: userx host: % password: 1111 (with full privilege) # mysql -uuserx -p after entering the password, I fail to connect to the server. I cannot connect to Mysql server with the client application either. If I delete the password, I CAN connect to it with both mysql and client application.
Password For Mysql Table
i would like make password to access one table i dont need the privillage method . if there is not .please tell me how can i encrypt/decrypt table .
How Do I Connect To MySql Without Password
I have given a password to root user. But I want to connect to the databases in the MySql without password during development. How do I do that? I am asking this question because I am having the following problem when I tried to connect thru php : Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in C:Program FilesApache GroupApachehtdocs estmysql.php on line 5 connect error: Access denied for user 'root'@'localhost' (using password: NO) My php code: mysql_connect("localhost", "root") or die("connect error: ".mysql_error());
MySQL Password Unknown
Unsure what to do next. 1. Apache running in task bar. 2. PHP info function brought expected results. 3. Clicking on MySQL Command Line Client brings up a DOS box that says: Enter password: When typing either the only password I would have used upon installing OR using nothing and pressing ENTER, the box disappears with a loud computer default beep, then nothing.
MySQL Root Password
I am having some trouble setting up the mySQL root password. It's probably right under my nose, but I can't seem to find where to edit it.
Setting MySql Root Password
I feel a bit daft as I can't seem to get passed p21 of Database Driven Website by Kevin Yank. But I'm learning Ive got the latest copy and and want to follow it through to see what i can learn (lots I'm sure) Im on a mac osx and am trying to set the root password. He says to do this using terminal in the bin directory of my MySql installation. Where is it? i know basics about getting round terminal i.e changing directories and stuff.
Setting Root Password For MySQL
I'm Using the "Build Your Own Database Driven Website Using PHP and MYSQL" by Kevin Yank. On pg. 22 where the arguments new password are in parentheses, I typed in new password instead of my own new password ( I know that was dumb!). Anyway, when I quit the Mysql and start over I get the error: cannot login to local host password not excepted. How do I restart so that I can create a root password for Mysql?
Mysql Root Password Problem
i m new to learning mysql and php.i m following Kevin yank's build your database driven website and i am following well but i m stuck on one problem that is when i star mysql or connect it and give him my login and password of root.it give me error which says MySQL
Setting Mysql Root Password
Am having problems setting the root password for the mysql server on my computer. I'm using Mac OS X with apache, php 5 and mysql 4.1 installed. I've tried using the terminal utility but I've had an error message reading:
Change MySQL Root Password
My current user/pswd for my localhost is root/"" (no password). I'm following the directions in the mysql command line window (im on windows and installed mysql via wamp) and can't get to change the darn thing.
Mysql As A Service And Root Password (-w W)
I have a few qeustions for some linux/mysql pros in here. Background: I've just built MySQL on Mandrake Linux 9.1 from source. I can get the mysql service running my: shell> /usr/local/mysql/bin/mysqld_safe --user=mysql & but I don't know how to keep it running, or how to make it start at every bootup. How do I do that? Also, I've made an alias to mysql: alias=/usr/local/mysql/bin/mysql but it won't span sessions, I think I need to export it, but I'm not sure how to. Also, via mysqladmin I set the root password to "password" which I don't want to keep :) how do I got about changeing it now? Thanks so much for your help. I know I probably should have installed via RPM, but I'm wanting to learn as much as I can about all of this.
RESET Password Of Mysql On Mac OS Server
Can somebody help me reset the password on mysql ? I need the commands to force the change cause I can't login to mysql. I am using mac os server 10.3.9 and I have messed up the mysql password I have full access priviliges on the mac server.
Default MYSQL Server Password
I just installed MySQL server 3.23.58-1. Now I can't find the password en can's change the settings. Who knows this password?
MySQL Administrator Remembering The Password
I have MySQL installed on a Windoz2000 platform and I'm using MySQL Administrator to manage the thing. Until recently MySQL Administrator would remember the StoredConnection, ServerHost and UserName but the Password box was always blank and needed me to enter the password each time I started it up. This was fine. However it now remembers the password as well ! & this is NOT good. I can find no way of getting rid of the password from the dialog box or telling MySQL Administrator not to remember it. There must be a setting somewhere that I've inadvertently flipped - but I can't find it. Any ideas ?
Making Mysql Username And Password
im setting up phpAdsNew and they ask for my database (mysql) username and password... i go to google and search on how to create usernames and passwords and i choose the link on mysql.com... it tells me to do this: GRANT ALL PRIVILEGES ON database TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; i do that and all goes well...i go back to the installing of phpAdsNew and put in the username and password i made... it still doesnt work... so could someone tell me if thats how to make a username and password in mysql or if there is something wrong with phpAdsNew... and i'm using the mysql command line client to put the code in...just incase you need to know that.
MySql Username / Password And Config
Firstly USERNAME AND PASSWORD? You define them where? Edit them where? http://localhost will not work on my computer, how can I make MySql run from 127.0.0.1 ?
PHP Md5 Not Same As Mysql Md5 Password-whats Wrong?
I made a user/login system that uses MD5 security for the passwords. When the person logs in, the password they enter in the html form is encrypted with md5 security and is set to match the password in the database. Here's a quick example. //collect the post data $username = $_POST['username']; $password = $_POST['password']; $password2 = md5($password); //TEST TO SEE IF THE ENCRYPTED PASSWORD MATCHES IN THE DB, WHICH IT DON'T! echo $password2; $sql="SELECT * FROM members WHERE username='$username' AND password='$password2'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0) { echo("Wrong username and/or password. Please try again."); } else { echo("Login Successful! Please wait..."); } What is wrong here? I tried various methods of placement of the MD5 function in the registration and the password that is being entered in the database is always the same, but the one from the form never matches.
Trying To Store A Password In Mysql Table
Not certain if thats the right way...i changed the function to PASSWORD and it encrypted it, but when i'm trying to match the password with the encrypted one, it doesn't work. i've been looking online and see that the password function in mysql may not do what i need. i'm looking for extra security, that's why i wanted it.
View Mysql Users Password
How can i view a mysql users account's password, i have got all privileges so it should be possible? When i have a look in the mysql table the passwords are coded.
MySQL Administrator - Password Storage
I am scheduling backups using MySQL Administrator and have to set the Password Storage options for it to work. What I am wondering is how does the 'OS Specific' password storage method work? Are any of these password storage methods secure? If not, how else can I automatically backup the server?
Syncronising MySQL Dbs Across Needing Password
I have a MySQL 4.0.12 set up and running on a Server ( called AServer ) which is being accessed by users over a WAN from remote sites. ( MS Access front ends ) However, one of the databases now needs to be accessed by users who are on a remote server ( called HServer ) that does not have automatic 'trust' between itself and AServer. Is there a way of setting up a replica of the MySQL database on HServer and get the two to re-synchronise on a ( say hourly ) basis. To do this the MySQL database will need to supply the Admin UserName and Password in order to unlock the link between the two servers.
MySQL Password Doesn't Work Anymore
A few weeks / months ago i set up MySQL 4.1.10a on my ClarkConnect gateway / router / dev server. Once it was up and running i changed the password for root to one i can remember quite well and always use for development work. I logged in successfully using that password, did some of the post install tasks suggested in the mysql install guide and haven't touched it since. Today, i'm trying to login to mysql using root and i'm getting access denied. I have not touched it since the last time the password worked. I've gone thru my putty logs and verified i'm using the right password. The only thing that has changed since the install is that the computer i am running putty from has been upgraded and OS re-installed but i can't see how that would make a difference to something happening on the clarkconenct box. Any ideas wtf is going on? Should i just give up and re-install?
Lost Password For MySQL Table....
I need the DBPASS for one of my MySQL databases. Unfortunatly I made it a while ago and never thought i would need to know the password. Im not sure what the password is.... Ive got two options: 1. find out the old password 2. reset the password to another password but the problem is then i need to tell the forum (invision power board) that the password has changed. If anyone knows how to change the DBPASS on invision power board,
Change Your User Name And Password For MySQL
I only know and have access to a password to access MySQL. So how do we know what our user name is or how do we change our user name and password for MySQL once we have and know this information?
Mysql As A Service And Root Password (-w W)
Background: I've just built MySQL on Mandrake Linux 9.1 from source. I can get the mysql service running my: shell> /usr/local/mysql/bin/mysqld_safe --user=mysql & but I don't know how to keep it running, or how to make it start at every bootup. How do I do that? Also, I've made an alias to mysql: alias=/usr/local/mysql/bin/mysql but it won't span sessions, I think I need to export it, but I'm not sure how to. Also, via mysqladmin I set the root password to "password" which I don't want to keep :) how do I got about changeing it now? Thanks so much for your help. I know I probably should have installed via RPM, but I'm wanting to learn as much as I can about all of this.
|