PDA

View Full Version : Basic MySQL syntax help please ...


vfxtalk
Tue 6th May '03, 6:33am
Hi All,

I am Extremely new to MySQL and would like to know the syntax to enter at the mysql> dos prompt on Windows machine to do the following:



- Create a user and password for a given database


Thats it :)

Also, how do i import a vBulletin db backup ??

Cheers for your time :)

Icheb
Tue 6th May '03, 10:38am
http://www.mysql.com/doc/en/GRANT.html

And to your second question:
http://www.mysql.com/doc/en/mysqldump.html
"mysql database < backup-file.sql"
(Mentioned pretty close to "User Comments")

vfxtalk
Tue 6th May '03, 10:14pm
http://www.mysql.com/doc/en/GRANT.html

And to your second question:
http://www.mysql.com/doc/en/mysqldump.html
"mysql database < backup-file.sql"
(Mentioned pretty close to "User Comments")
hi icheb,

thanks for that, although i can get it to work...i think im one step ahead off myself.

This is the scenario....

i have an online forum that i have downloaded and backed up (backed up to a .sql file). I am trying to get the exact forum setup locally on my machine (for offline testing), as per the config.php settings found in forum/admin/config.php.

So i figure i need to create a local environment to accept the following seetings, and then do i db import from the .sql backup ???:
<?php
/////////////////////////////////////////////////////////////
// Please note that if you get any errors when connecting, //
// that you will need to email your host as we cannot tell //
// you what your specific values are supposed to be //
/////////////////////////////////////////////////////////////

// type of database running
// (only mysql is supported at the moment)
$dbservertype="mysql";

// hostname or ip of server
$servername="localhost";

// username and password to log onto db server
$dbusername="username";
$dbpassword="password";

// name of database
$dbname="db_vbulletin";

// technical email address - any error messages will be emailed here
$technicalemail = "me@localhost.com";

// use persistant connections to the database
// 0 = don't use
// 1 = use
$usepconnect = 0;

// which users are allowed to view the admin log
// separate each userid with a comma
$canviewadminlog = "1";

// which users are allowed to prune the admin log
// separate each userid with a comma
$canpruneadminlog = "";

?>

How do i actually set it up so that i can have my online - offline ??

Any further help would be very much appreciated.

Cheers

Paul

eva2000
Tue 6th May '03, 11:11pm
for locally to work you need to install apache 1.3.27, PHP 4.3.1 and MySQL on your local machine

vfxtalk
Tue 6th May '03, 11:21pm
hi eva,

yup i have all that in and running well :)

I just need to know actually how to get the online forum working offline

Is there a vBulletin procedure for running an offline / local version of an online forum ??

Cheers

Paul

eva2000
Tue 6th May '03, 11:29pm
hi eva,

yup i have all that in and running well :)

I just need to know actually how to get the online forum working offline

Is there a vBulletin procedure for running an offline / local version of an online forum ??

Cheers

Paul
the procedure is basically the same as online as offline.. if you use linux locally.. if you use windows then read windows guide at http://www.vbulletin.com/forum/showthread.php?threadid=69072 just commands are slightly different for mysql > http://www.mysql.com/doc/en/Windows.html

vfxtalk
Wed 7th May '03, 12:57am
hi eva,

my problem is not installing php/mysql/ etc etc ... thats all fine

the problem i have is that i dont know how to reconstitute my online forum with a local/offline version. esentially all i want to do is have a local offline site where i can test hacks etc before publishing them online...but at the moment all i have locally is php, MySQL, and downloaded version of the whole site, and a .sql backup of the forum.

Do you know what i mean ???...cheers for your continued help, looking forward to hearing from you soon.

paul

eva2000
Wed 7th May '03, 2:24am
1. you need to configure apache properly hence the above thread
2. you need to make sure you have apache root public directory setup so when you start apache and mysql you can access your web site at http://localhost/

so if you install vB forum at /htdocs/vb

http://localhost/vb/

then import sql via windows command line http://www.mysql.com/doc/en/Windows.html and edit config like you normally do to set mysql database and username/password