Cannot Populate Database

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Devious Designs
Forum Newbie
Posts: 4
Joined: Thu Mar 23, 2006 11:00 am

Cannot Populate Database

Post by Devious Designs »

Okay, I don't know how or which combination I used, but I think I created the database.
Last login: Wed Mar 29 01:29:42 on ttyp1
Welcome to Darwin!
mac:~ albert$ CREATE DATABASE TrioMotors;
-bash: CREATE: command not found
mac:~ albert$ cd \
> cd mysql\bin
-bash: cd: cd: No such file or directory
mac:~ albert$ cd mysql\bin
-bash: cd: mysqlbin: No such file or directory
mac:~ albert$ wtf
-bash: wtf: command not found
mac:~ albert$ cd mysql\
> -uroot
-bash: cd: mysql-uroot: No such file or directory
mac:~ albert$ CREATE DATABASE TrioMotors;
-bash: CREATE: command not found
mac:~ albert$ /usr/local/bin/mysql
-bash: /usr/local/bin/mysql: No such file or directory
mac:~ albert$ mysql -uMonaco -pmonaco
ERROR 1045 (28000): Access denied for user 'Monaco'@'localhost' (using password: YES)
mac:~ albert$ lol
-bash: lol: command not found
mac:~ albert$ CREATE DATABASE TrioMotors;
-bash: CREATE: command not found
mac:~ albert$ mysql -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 17 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> CREATE DATABASE TrioMotors;
Query OK, 1 row affected (0.00 sec)

mysql> quit;
Bye
mac:~ albert$ Bye
-bash: Bye: command not found
mac:~ albert$ mysql -uroot TrioMotors < ~/Documents/insert.sql
mac:~ albert$ mysql -urrot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19 to server version: 4.1.18-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> TrioMotors < ~/Documents/insert.sql
-> -uroot TrioMotors < ~/Documents/insert.sql
-> -uMonaco -monaco TrioMotors < ~/Documents/insert.sql
-> wtf
-> \h

For information about MySQL products and services, visit:
http://www.mysql.com/
For developer information, including the MySQL Reference Manual, visit:
http://dev.mysql.com/
To buy MySQL Network Support, training, or other products, visit:
https://shop.mysql.com/

List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear (\c) Clear command.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set query delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
nopager (\n) Disable pager, print to stdout.
notee (\t) Don't write into outfile.
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.

For server side help, type 'help contents'

-> -uroot TrioMotors < ~/Documents/insert.sql
-> -uroot TrioMotors < ~/Documents/insert.sql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TrioMotors < ~/Documents/insert.sql
-uroot TrioMotors < ~/Documents/insert.sql
-' at line 1
mysql> right :rolleyes:
->
now I cannot populate it.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

what's in insert.sql?
jrd
Forum Commoner
Posts: 53
Joined: Tue Mar 14, 2006 1:30 am

Post by jrd »

Log into mysql and type this:

Code: Select all

mysql> source C:/~/Documents/insert.sql
Post Reply