Forum Moderators: coopster
tying to use -u -umyusername -pmypassword < path to sql file
in the mysql terminal in shell on osx
but its not working. to be honest i dont have a clue when it comes to using the terminal. i cant seem to be able to even create a new databse.
i have my .sql file and i want to run my local mysql the same as the production mysql online for testing.
also my database is called mydomain_com_-_mydatabase
not sure why i have _-_ but online all my php works fine.
i dont want to have to use two connect scripts, can i use the same connect script to connect local and remotely.
some one please help me to get mysql up and running localy!
i have myPHPAdmin running, i can see all my databases, tables etc.
when i run my php pages locally on the Apache server it says:
Warning: Access denied for user: 'root@localhost' (Using password: YES)
i have tried using all the logins i can think of, my normal user-name etc..
the thing is ideally i want to have the same user-name and password on my local mysql as my remote one so i dont have to change any connection scripts.
i hope that make some kind of sense?
where am i going wrong? i have tried to create a new user in myPHPAdmin, the same name as my remote login but it says access denied, even my root log-in is not good!
if you run an Apache and Mysql from a home machine
give yourself the max "all Privileges"
try to deal with your db problem
and then do an export
You can't just change the root pw by editing the user table in the mysql database - you have to do it from the phpmyadmin homepage by editing the root on localhost user.
If you already did it that way, and phpmyadmin won't let you in the door you might have to fiddle with the config.inc file for phpmyadmin. Like - Add your pw info to it. Make sure your host is localhost...
i have gone to the privileges pages in myPHPAdmin.
i have 'myname localhost' i have all privileges except grant! the root user has all privileges. how do i run as root user, i though that as i am the administrator on this machine i should have all privileges.
i need to be able to create another user for mysql, with ALL privileges the same user-name and password as my remote site.
in myphpadmin, is 'root' user the same as 'unix' root user. i dont want to have to be logged in as root user to work the database.
sorry, am i just being stupid?
i can change the user-name on my php pages and they now connect to my local mysql no problem and do their stuff fine. but if i upload them the user-name is wrong for the remote server! do you see my problem?
thanks. i am trying ( honest ) :-) just wish Apple would put a tab in the System Prefs control panel to do all this!
got it all working.
granted my self complete privileges in the 'terminal' window. i had tried that before. anyway, works now.
i then created a new user, with the same name and password as i use for my remote site. now all the php pages which i run on the remote server work exactly the same running local! yippee
wow, my brain hurts. why are these things such a struggle!
anyway, thanks for the help. got there in the end
thanks
without PHPMyAdmin on RH and using for example MC “midnight commander”
type: (first get a MySQL commend line window)
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON my_database.*
TO my_database_administrator@localhost IDENTIFIED BY ‘my_database_password’ ;
Remember to substitute the my_database etc.. by your own db name and PW