Create database with *.sql file

Everything related with getting rsyslog up and running (but not beyond that point ;))

Moderator: rgerhards

Create database with *.sql file

Postby bobpaul on Tue May 23, 2006 1:18 am

Sorry, but I'm rather nubile in terms of MySQL. I've used it for wikis and other projects, but the requirements have always just been "Install MySQL, set the password, install wiki/whatever, enter MySQL password"

I've never created a database from a *.sql file manually before. The RSyslog info says "Then, run the script with your favourite MySQL tool. Double-check that the table was successfully created." I know how to check if it's been created, but I don't know how to run the script. Do I want to use the mysql command, or is there some other command I need to use the run the script?

Thanks much
bobpaul
New
 
Posts: 1
Joined: Tue May 23, 2006 1:13 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

RE: Create database with *.sql file

Postby mmeckelein on Tue May 23, 2006 10:50 am

Hello,

You can run the following command

Code: Select all
mysql <my_db_name> -u<user_name> -p<password> < script.sql


or you will find detail information in the mysql manual, e. g.:
8.6.3. Executing SQL Statements from a Text File
http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html

If you are looking for a user interface, probably it is worth to take a look into phpMyAdmin:
http://www.phpmyadmin.net

Hope this helps.

Best Regards,
Michael Meckelein
Adiscon
mmeckelein
Adiscon Support
 
Posts: 167
Joined: Wed Mar 12, 2003 12:07 pm

Google Ads



Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests

cron