GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   MySql Database Questions/Help (https://gfy.com/showthread.php?t=612135)

Wildcard2 05-20-2006 12:47 PM

MySql Database Questions/Help
 
Ok so here is the story.
I have a virtual hosting account w/ Cpanel and SSH/Shell access on.

So here is the question and problem. I have a designer that designed a website and used mysql database with the website...thats fine... now he designed the site on his computer in the office along with the database.
So I get the site uploaded to the server thats fine...then he tells me what the database U/P needs to be and the database name ok..

So go into Cpanel and set that up...not a problem..
Then he emails me several files with the following extenions .frm .MYI .MYD each one of the extenions has the same filename and there are few files like that. Now he tells me he got the files right out of the database program he is using to develop the MySql and says all I have to do is copy them into the folder on the server where the MySql database is stored but having a virtural account I don't have access to that directory.
In the past I emailed the files of the database to the tech host and they put them in the database or imported them what ever they did.

Question is, is there anyway I can do it from my computer or Cpanel. I heard of one way in the shell access with the following command but need a little more explaintion to it.

mysql -u "User" -p "Pass" "Databasename" < "dumpfile"

It looks simple but how or where do I have to have the files for the server to find them if I use a "dumpfile"....in the SSH/Shell its not going to popup a browse option to find the file on my computer...

So any ideas?

wc2 :thumbsup

Wildcard2 05-21-2006 12:29 AM

bump for the night crew

darksoul 05-21-2006 12:33 AM

You need an sql dump to import the database, using raw mysql files its not pretty cool, especially if you're not running the same version of mysql.

Now, you can easily import the sql file through phpmyadmin available in cpanel.
Or if you want to do with with ssh, upload the file to your server
lets say in your home directory. (the one that has public_html in it and others)
the connect to ssh with putty and run the import command you have listed above.

When you connect to ssh your default path will be your home directory and
the sql file should be there.
You can type "ls" at the command prompt to list the files.

topnotchxxx 05-21-2006 12:37 AM

Have your webdesigner save the database as an SQL Dump. This is just one massive SQL file which can be used to recreate the database and data if there is anything in it.

Then on your virtual site's Cpanel, you will find an option for MySQL Database, create a database and a database user. Then click on the PHPMyAdmin where you can Import the SQL Dump.

Never work with actual SQL files as they can get very messy.

viango 05-21-2006 04:09 AM

just click my sig

Wildcard2 05-21-2006 08:19 AM

Thanks for your help.. The files still didn't upload properly so I am going to go with the other suggestion and just kick the designers ass instead and get a SQL dump instead.

wc2

duckduckgoose 05-22-2006 07:43 PM

Databases larger than five or ten megabytes often will time out the system when uploading them (when attempting to install them from phpmyadmin, for example); so you can either :

have him give you a .SQL file (dump), but load it into the actual MySQL database direct from the command line (and NOT from phpmyadmin)
...or...
just install the files he gave you from the command line...

the first option mentioned above (loading dump file from command line) is probably easiest.

nestle 05-22-2006 07:53 PM

MySQL comes with a utility called 'mysqldump'. He can use that binary file to create a full dump of any database in plaintext.


All times are GMT -7. The time now is 08:45 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123