PDA

View Full Version : Uploading MySQL Database?


DOSMAN
5 Oct 2003, 09:34 PM
I'm a real n00b at MySQL and I'm just barely making my way by.


But I have managed to set up a database just how I want it on my local pc.

My question:
How do I upload it to my web host's server?

Shorty
5 Oct 2003, 09:40 PM
Open a DOS window..

Navigate to your MySQL database folder (normally under Windows.. it's C:/mysql/bin

Type:

mysqldump --opt -uroot -p yourdatabasename > yourdataname.sql

Replace yourdatabasename by the name of your database :)

It will then prompt you for your root SQL password. Enter it and you will have an SQL dump.

Upload to your remote server. Then create the remote database name if you have the option. Some hosts provide you a database already created.

At the command line.. type

mysql -uusername -p createddatabasename < yourdatabasename.sql

Substitute username for your remote server database username, replace creatededdatabasename with the datbase name provided by your host.

That is a basic overview. If it makes no sense, drop me a PM as you don't want to go publishing database user/passes in public ;)

a2jfreak
5 Oct 2003, 10:12 PM
I think Shorty covered it.

Good seeing you back on S-M DOSMAN. You stay away too much.

DOSMAN
5 Oct 2003, 10:14 PM
mysqldump: Got error: 1045: Access denied for user: 'root@localhost' (Using password: YES) when trying to connect


What'd I screw up?

DOSMAN
5 Oct 2003, 10:18 PM
Ok, I think that I forgot my local password. :shakehead

How do I reset it? I uninstalled/reinstalled but it didnt do anything.

DOSMAN
5 Oct 2003, 10:24 PM
Oh never mind. Ha, i had NO password. No wonder none of my normal ones worked.

Shorty
5 Oct 2003, 10:35 PM
Glad u got it :)

Need any help with the remote side.. let me know via PM :)

DOSMAN
6 Oct 2003, 12:17 AM
Shorty is the greatest!!

My problem has been resolved