I'm just starting with MySQL and am experimenting with user permissions. I've created a new user on my local machine called 'sampadm' with password 'secret' as per my textbook's tutorial. Accessing the MySQL command line from the system tray prompts me with the 'root' password without first offering the option for other users. Additionally, when accessing the 'mysql.exe' file (which is the MySQL command-line executable within the mysql bin) I get an error for not having access as 'ODBC'. I understand why this is, but how do I work with it?
What I'm asking is: how do you access the MySQL command-line with an account other than root, and can the solution somehow be implemented in such a way to allow for shortcuts/launch-modifiers? A preferable alternative (if possible) would to have access to the Apache command-line so I could just type "% mysql -p -u sampadm", but I know nothing of Apache or how it is set up with this package.
You can change the user that will be used by clicking on the MySQL->MySQLConsole by making a change to the wampmanager.ini file in your X:\WAMP folder.
It appears that "wampmanager.ini" is updated (at least for certain sections/lines) from "wampmanager.tpl" upon WAMP invocation. So you may need to make RiggsFolly's mod there instead. Don't forget to make a copy of "wampmanager.tpl" before you make any mods.
Edited 1 time(s). Last edit at 06/05/2012 06:58AM by trumpman.
type: mysql -uroot -p or mysql -uroot if you haven't set the password for the root user
then you must create the user with the root permission before you can use the username.
type this in the command line windows
create user 'username'@'localhost' identified by 'password';
grant all privileges on *.* to 'username'@'localhost' identified by 'password' with grant option max_updates_per_hour 0 max_connections_per_hour 0 max_queries_per_hour 0 max_user_connections 0;
exit;
now should can login with the 'username' and the password 'password'
you also can customizing the privileges like update,delete,select on databasename.* to the username.
www.mesinhosting.com
Edited 1 time(s). Last edit at 06/22/2012 11:04PM by mesinhosting.