Re: [expert] Stupid MySQL question
Is the client linux or windows? If the client is a windows box connecting to a linux box to use the sql you have to set up odbc it will link your client to the sql database and allow it to use it. If this is what your using and need more help I'll be glad to help. Robert - Original Message - From: "Gavin Clark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 09, 2000 2:35 AM Subject: Re: [expert] Stupid MySQL question > > tables.sql, I'll bet, is a set of SQL instructions that will set up a > database and all its tables. You tell the mysql client program to read the > file and run everything in it. > > first, in the MySQL manual read the part about adding users and setting an > admin password. > > set up a user that the web server to connect to the database as. > > you'll have to get the specifics form the manual but here's my cheat sheet: > > log into the mysql client program as 'root': > > #mysql mysql -u root -p > > grant insert, select, delete, update on adatabase.* to webuser@localhost; > > UPDATE user SET password=PASSWORD('yourpassword') where user = 'webuser'; > > next from the command line cd to the directory that holds tables.sql > > then run: > > #mysqladmin create tables > #mysql tables < tables.sql -u username --password=userpassword > > where "tables" is the name of the database you are creating (I'm guessing > based on the filename) > > the first line makes the database, the second tells the mysql client program > to execute the SQL commands in "tables.sql" as a particular user with a > particular password. > > hopefully this will get you started. > > good luck, > > Gavin > > on 10/8/00 5:44 PM, Asheesh Laroia wrote: > > > I have a server (www.AsheeshEnterprises.com) set up, and I wanted to add a > > logging program to it. I downloaded "bitlog" which I found from > > freshmeat.net, and it requires MySQL. I have it installed, and running. > > > > So, the install instructions say: > > > > "First of all, you have to have PHP installed, and a working MySQL server. > > Create the necessary tables by running tables.sql through mysql." > > > > So, what do I do now? I have the file "tables.sql" in the directory, but > > have no idea how to "run it through mysql". I started MySQL via > > /etc/rc.d/init.d/mysql start, and it started fine. > > > > Help! I feel so inadequate. . . . > > > > ;-). > > > > Thanks in advance. > > > > -- Asheesh Laroia. > > > > > > Keep in touch with http://mandrakeforum.com: > Subscribe the "[EMAIL PROTECTED]" mailing list. > Keep in touch with http://mandrakeforum.com: Subscribe the "[EMAIL PROTECTED]" mailing list.
Re: [expert] Stupid MySQL question
tables.sql, I'll bet, is a set of SQL instructions that will set up a database and all its tables. You tell the mysql client program to read the file and run everything in it. first, in the MySQL manual read the part about adding users and setting an admin password. set up a user that the web server to connect to the database as. you'll have to get the specifics form the manual but here's my cheat sheet: log into the mysql client program as 'root': #mysql mysql -u root -p grant insert, select, delete, update on adatabase.* to webuser@localhost; UPDATE user SET password=PASSWORD('yourpassword') where user = 'webuser'; next from the command line cd to the directory that holds tables.sql then run: #mysqladmin create tables #mysql tables < tables.sql -u username --password=userpassword where "tables" is the name of the database you are creating (I'm guessing based on the filename) the first line makes the database, the second tells the mysql client program to execute the SQL commands in "tables.sql" as a particular user with a particular password. hopefully this will get you started. good luck, Gavin on 10/8/00 5:44 PM, Asheesh Laroia wrote: > I have a server (www.AsheeshEnterprises.com) set up, and I wanted to add a > logging program to it. I downloaded "bitlog" which I found from > freshmeat.net, and it requires MySQL. I have it installed, and running. > > So, the install instructions say: > > "First of all, you have to have PHP installed, and a working MySQL server. > Create the necessary tables by running tables.sql through mysql." > > So, what do I do now? I have the file "tables.sql" in the directory, but > have no idea how to "run it through mysql". I started MySQL via > /etc/rc.d/init.d/mysql start, and it started fine. > > Help! I feel so inadequate. . . . > > ;-). > > Thanks in advance. > > -- Asheesh Laroia. Keep in touch with http://mandrakeforum.com: Subscribe the "[EMAIL PROTECTED]" mailing list.
Re: [expert] Stupid MySQL question
Asheesh Laroia wrote: > > I have a server (www.AsheeshEnterprises.com) set up, and I wanted to add a > logging program to it. I downloaded "bitlog" which I found from > freshmeat.net, and it requires MySQL. I have it installed, and running. > > So, the install instructions say: > > "First of all, you have to have PHP installed, and a working MySQL server. > Create the necessary tables by running tables.sql through mysql." > > So, what do I do now? I have the file "tables.sql" in the directory, but > have no idea how to "run it through mysql". I started MySQL via > /etc/rc.d/init.d/mysql start, and it started fine. just use the mysql command : mysql -u [-p] DataBase < tables.sql where user is the user owning (or having access to) DataBase, option '-p' must be used if you've set a password for 'user'. If you're running some PHP enhanced Web server, just pick up phpMyadmin package, it will help you a lot in administering tasks... Hope this help. -- Jose Luis Y no llegaste a quererme, y eran mis cinco sentidos Y no llegaste a quererme, y que desgraciaito he sido Y que ha tenido que aborrecerte tanto como te ha querido (Camaron) Keep in touch with http://mandrakeforum.com: Subscribe the "[EMAIL PROTECTED]" mailing list.