Jump to content

Archived

This topic is now archived and is closed to further replies.

Devious Designs

Cannot Populate TrioMotors < ~/Documents/insert.sql

Recommended Posts

Okay, I don't know how or which combination of commands I used, but I think I created the database.

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]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:
[a href=\"http://www.mysql.com/\" target=\"_blank\"]http://www.mysql.com/[/a]
For developer information, including the MySQL Reference Manual, visit:
[a href=\"http://dev.mysql.com/\" target=\"_blank\"]http://dev.mysql.com/[/a]
To buy MySQL Network Support, training, or other products, visit:
[a href=\"https://shop.mysql.com/\" target=\"_blank\"]https://shop.mysql.com/[/a]

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:
-> [/quote]

now I cannot populate it.

Share this post


Link to post
Share on other sites
Personally, I find it much easier to just use a DB management tool, like PHPMyAdmin. commands like that become hideously confusing.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.