Re: creating database users
it does this:
----------------
C:\Program Files (x86)\EasyPHP-12.0\mysql\bin>mysql -h 127.0.0.1 -u BOREHOLES -p
Enter password: ****************
ERROR 1045 (28000): Access denied for user 'BOREHOLES'@'localhost' (using passwo
rd: YES)
C:\Program Files (x86)\EasyPHP-12.0\mysql\bin>
----------------
doesn't like me...
when i create the user name without a password in the same process it does this:
----------------
C:\Program Files (x86)\EasyPHP-12.0\mysql\bin>mysql -h 127.0.0.1 -u BOREHOLES -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.5.25a-log MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
-------------
so that's one thing...
when i change the password to something fixed:
$sql = "grant ALL on ".DATABASE_NAME.".* to '".$usn."' identified by 'hello';"
i also get a failed login when i try it.
when i try using a new username without password from php i get this:
Warning: mysqli::mysqli(): (HY000/1044): Access denied for user ''@'localhost' to database 'testing_db'
which would make one think that i'm swapping the username and password around, but i know i don't as i use the same function to connect always, and when i replace the new username with root, it logs in successfully
one thing:
i have been running this thing repeatedly now. every time a new password is created and used when the database is created and installed. next time i rerun the installer, i drop the database and recreate the database and user, but i don't drop the user first.
would that matter?
i would imagine if the user already exists somewhere the create thing would fail when the user exists somewhere else?
Edited 1 time(s). Last edit at 12/19/2012 02:56AM by peter le roux.
Subject
Written By
Posted
December 18, 2012 02:15AM
December 18, 2012 02:22AM
December 18, 2012 11:31AM
December 19, 2012 01:01AM
December 19, 2012 01:07AM
Re: creating database users
December 19, 2012 02:19AM
December 19, 2012 05:43AM
December 19, 2012 07:42AM
December 19, 2012 03:08PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.