skaterdav85 12 Posted February 9, 2009 Report Share Posted February 9, 2009 sorry if this is a newby question, but im new to mysql. So I installed MySQL, but i dont know how to access the mysql command-line utility. how do i get there?I also installed XAMPP on my other computer and am using phpmyadmin to create a mysql database. does that have a mysql command line prompt instead of teh GUI?Thanks! Quote Link to post Share on other sites
justsomeguy 1,135 Posted February 10, 2009 Report Share Posted February 10, 2009 The MySQL command line tool is just called mysql:http://dev.mysql.com/doc/refman/5.1/en/mysql.htmlIt doesn't get installed with phpMyAdmin, it gets installed with the MySQL server. Quote Link to post Share on other sites
webtrix 0 Posted February 10, 2009 Report Share Posted February 10, 2009 Start > Run > cmdcd yourself to /mysql/bin (I suppose)mysql --user=user_name --password=your_password db_namehttp://www.google.com/search?q=mysql+command+linehttp://dev.mysql.com/doc/mysql/en/mysql.htmlhttp://dba.fyicenter.com/faq/mysql/mysql_c...face_mysql.html Quote Link to post Share on other sites
skaterdav85 12 Posted February 11, 2009 Author Report Share Posted February 11, 2009 thanks.also, i am using a book to help me learn, and it came with 2 .sql files. What are these? and where in my XAMPP folder would i put them to use them? Quote Link to post Share on other sites
Synook 47 Posted February 11, 2009 Report Share Posted February 11, 2009 .sql files are basically pre-written lists of SQL queries, that can be executed all at once. They are in text/plain format - you can open them in notepad and have a look. Quote Link to post Share on other sites
skaterdav85 12 Posted February 11, 2009 Author Report Share Posted February 11, 2009 .sql files are basically pre-written lists of SQL queries, that can be executed all at once. They are in text/plain format - you can open them in notepad and have a look.do i use these to create the db examples? if so, how? Quote Link to post Share on other sites
jlhaslip 1 Posted February 11, 2009 Report Share Posted February 11, 2009 An SQL file will have all the SQL commands to edit, update, delete, insert, etc.You can use these commands in a GUI for MYsql (example phpmyadmin). Simply cut and paste the code into the SQL input area within phpmyadmin's SQL tab. Quote Link to post Share on other sites
skaterdav85 12 Posted February 11, 2009 Author Report Share Posted February 11, 2009 An SQL file will have all the SQL commands to edit, update, delete, insert, etc.You can use these commands in a GUI for MYsql (example phpmyadmin). Simply cut and paste the code into the SQL input area within phpmyadmin's SQL tab.in php/mysql development, do most people use the GUI or the command line utility? Quote Link to post Share on other sites
justsomeguy 1,135 Posted February 11, 2009 Report Share Posted February 11, 2009 You can run a file with SQL commands using the command line like this:mysql < c:\path\to\file.sqlIf you need to specify a database, username, and password, it's like this:mysql -h localhost -D [database_name] -u [user_name] -p[password] < c:\path\to\file.sql do i use these to create the db examples?The best way to figure that out is to open the files and see what the code says. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.