Command Line Mysql
I have seen similar questions to this on the site but haven't yet found the answer for me, I have done a couple of years messing about with access databases on a single computer at work. I know about spliting the data and control into seperate files etc etc. I would now like to know about setting up a database on the web, accessable from home and at work, so have been advised to have a look at MySQL.
OK, so I have now installed Mysql, PHP and Apache onto my computer to try it out.
I have a pretty set of traffic light which are at green, and I have a feather (apache) with a green indicator on it.
I can click on the traffic light and click "show me" and a pretty usefull looking panel with a heading of WinMySQLadmin 1.4 comes onto the screen.
Now, my book (Database driven websites), on page 34 says that whichever method I use to run the MySQL client program I'll end up at a command prompt. HOW? Do I start a command prompt myself?
So, I have tried opening a command prompt and navigating to C:mysqlBin and typing in mysql -u test -p; and then at the prompt for the password have entered test, but it doesnt let me in!!??
I used test as the "control panel" "my.ini.setup" tab includes the following
[mysqld]
basedir=C:/mysql
#bind-address=86.63.19.6
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=test
password=test
QueryInterval=10
I've also tried user name root with password test
I've also tried just using mysql by itself, which lets me start it, but I cant do much with it, like CREATE DATABASE isn't allowed but SHOW DATABASES is.
Brett_iow_UK
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Mysql Via The Command Line
I type "mysql -u user -p=password" on the command line and get an access denied message. I type "mysql -u user" and then type in "password" when prompted and it works just fine. Unfortunately, doing it this way isn't an option because I want to make a script that'll auto-restore a database everytime I run it. I've tried surrounding password by double quotes and single quotes and neither work.
Mysql Command Line With OSX
i think i have installed mysql properly. when i go to the system preferences it is there and it says that it is running. BUT when i am in the terminal window, and type: Lachlan-Gregors-Computer:~ loc$ cd /usr/local/mysql/bin it goes to this, so i keep typing to try to login Lachlan-Gregors-Computer:/usr/local/mysql/bin loc$ mysql -h localhost -u root -p but it just says : -bash: mysql: command not found Lachlan-Gregors-Computer:/usr/local/mysql/bin loc$ .
Mysql Command Line
I'm having issues with how my data displays from the command line mysql interface. When I do a SELECT * FROM tablename The return only doesn't show the first few fields? The data is there because if I do "SELECT FIELD1 FROM tablename" the data is there. Now I just inserted a new record and it is the only record to properly display?
MySql And The Command Line
I'm trying to write a cron script which backs up a mysql database on my website. I am using this command mysqldump --opt -h localhost -u user -p database | gzip > /path/for/backup/file.gz If I type this in and hit enter, it asks me for a password (like it should) but can I put this in the initial line as a separate argument so that I could execute it from cron?
Where Is The MySQL Command Line Client?
I have installed the XAMPP package on my computer, which contains appache php and mysql. however I don't know how to create a database with the command line client in mysql or even where to type the code required to set up a new database. Not a very interesting question, but it's vital i get an answer if i am to start learning.
MySQL Command Line Client
I have just installed MySql Server 5 on my Windows XP pc. When I start up the MySql Command Line Client, I type in the password and then the command line comes up. I create a database and then type use database: I then run the command source C;jt.sql. This drops tables if they are there and then creates the tables and inserts data. Once this has completed, I can then selet from the tables. For instance there is a table called users. If I type 'select * from users;' It comes back with the results and 2 row in set. This is fine however as soon as I exit from the MySql Command Client and come back in then I use database and show tables. There are no tables in there. My question is this, why are the data and tables not staying in the database? I have tried commiting but it makes no difference.
Issue MySql Line Command
do i have to cd to the MySql Server 5.0 folder to execute MySql? How do i make MySql a 'Universal command',which could be issued at any directory level?
Mysql Command Line Options
I am executing the following from the command line. mysql -uroot -t rep_queries_${yearmth} -A <<QUERY_INPUT SELECT count( distinct source_ip) from day_${yearmthday} where query_ip = $numip QUERY_INPUT It returns the heading along with the result (see below). Can I suppress things so that only the result is returned? I need to store the result in a unix variable. +----------------------------+ | count( distinct source_ip) | +----------------------------+ | 41 | +----------------------------+
MySQL Command Line Arguments
This is my problem: If I execute command like this from shell: shell>mysql -uuser -ppassword < c:MyFile.sql it executes ok, but if I put such command into a desktop shortcut on a windows machine, it does not (instead help is displayed for command-line arguments).
Opening Command Line MySQL On Win. ME
I have just installed MySQL Server 5 along with the ODBC 5 driver on my home office computer, which has Windows ME as the operating system. The add/remove programmes list shows they are installed, but the command line window simply comes and goes instantly, when I click on the MySQL command line under the programmes list. I did, initially, install MySQL with the ODBC driver on a computer running Windows XP and had no problem. But, I needed this on my home office computer. Have I installed the wrong driver for the Windows ME system or is there another reason
MySQL Command Line Client
I have had a quick search on the net to a solution for this one but show far have had no luck.At the moment I have a large stored procedure which I am writing in textpad and copying it into the ms-dos style window.My problem is that because the stored procedure is pretty large not all of the code is being displayed in the window, and therefore not always showing me my error.Is there a way to increase the amount of data that is displayed in the window? I have looked in the properties but can't see ay options related to history.Also is it possible in windows for mysql to remember your queries (by using the up arrow key) when you close the window like what happens on Linux?
Mysql Command Line Error
I m using mysql command line tool in my shell script for updating tables but there is no error handling provided in the batch mode for example i am doing mysql < sql > out The out file would only contain the output not the errors which mysql command line throws on the screen. I tried --tee options but wont work. I have been using Sybase for a long time it has a somethign similar to mysql command line tool known as isql in which u can direct ur output to a outfile which also contains errors if any while processing the query.
MySQL Command Line Prompt
In DOS mode, we can use for example dir/w-p to break the whole page to sub-page. In MySQL prompt window, when I type "show variables", it blooms about 190 rows, but I can't scroll BACK to first 1-50 rows, by resizing the prompt windows it won't help. So, I think is there any additional keys for pause the page like DOS mode?
Unable To Connect To Mysql From The Command Line
i have a php application which successfully connects to mysql and interacts with the database. I am using apache as my web server. I would like to invoke my code from the command shell, using php.exe like so: c:phpphp.exe c:script.php in script.php I am using mysql_connect to connect to the database. I get the following error: Access denied for user 'root'@'localhost' (using password: YES) Note that the same script is working perfectly when invoked via the web server... what do I need to do in order to make my script work from the command line?
Can't Login To MYSQL Command Line Client
I can't login into the MYSQL command line client, when I try to type in a password my computer just beeps and then closes the window. I was wondering if someone could tell me where I do go to get this password?
MySQL Command Line Client Problems
trying to import the world sample db into mysql. I keep getting the same error: Failed to open file 'world.sql', error: 2 Here's what my command line client window looks like when the error occurs: Enter password: ******* Welcome to the MySQL monitor. Commands end with ; or g Your MySQL connection id is 6 to server version: 5.0.16-nt Type 'help;' pr 'h' for help. Type 'c' to clear the buffer. mysql> CREATE DATABASE world; Query OK, 1 row affected <0.00 sec> mysql> SOURCE world.sql ERROR: Failed to open file 'world.sql', error: 2
Mysql Command Line Utility Help Facility
I have installed MySQL 5.0.18-nt on my Windows XP PC. So far everything looks good. One slight question about the command line utility; everytime I use the help command it does not find anything. Even "help contents" doe snot find anything. Is there something I can download and install so that the "help" command will be able to find the data for which I am searching.
Command Line Mail Merge From Mysql Db
I would like to be able to mail merge records from multiple mysql tables using a simple template, preferably via a command line script. MSWord mail merge via ODBC will not work for me as it only supports a single table. Are there any utilities or simple scripts avaialble that would accomplish this?
Mysql Start From Windows Command Line
I have mysql4.1.4 as the localhost on my windowsXP. I'd like start mysql server through windows command line by mysqld-nt. But it seems that "mysqld-nt" itself cannot start the server. But if I use "mysqld-nt --standalone" the mysql server started! But I don't really want mysql to be standalone. Can anybody help me? how do I start mysql server through command line correctly? I don't read the manual for this section, but there are bunch of options that I don't want to use, because I have the my.cnf file in c:/ folder.
User Creation With Mysql Command Line
why i can't connect to mysql using command line with account that I created from this one ( using command line),but I can connect to it ( from command line) ,if i created with phpmyadmin console.
Maximizing MySQL 5.x Command Line Client Window
How do i maximize the mysql Command Line Client Window? I can increase the size vertically. but cant Horizotally. Also because of this i thing, the more columns you have more jamed out put of tables.
Access MySQL Command Line History In WinXP
I've installed MySQL v4.1 onto my WinXP and unfortunately now need to reinstall my OS. I need to access my mysql command line history but don't know how. I know there's a .mysql_history file but that's just on Unix. Is there a similar file in Windows? If not, how does mysql remember all the commands? Where is it's buffer? Also, the doskey /history command only gives a history of the cmd.exe prompt so that's not what I want either.
Use Mysql Command Line To Unload Blob Data
I have been investigating mysql for a project to store and extract images from a blob field. I have searched on "blob" in the mysql forums and have read the pro and con arguments for storing images in a blob filed vs just storing the link to image file on-disk so we don't have to re-hash them here. I am trying to use mysql and suitable tools as a intermediate storage for inventory items extracted from QuickBooks Point of Sale system to allow the association of expanded text product descriptions and product image files with the exported POS inventory. I have found SQLYog to be a useful tool to allow me to create an inventory table with fields for existing values in the CSV delimited POS inventory unload file and to add blob fields to store text input for expanded product descriptions and product images. I can use any editor to create the expanded product descriptions and paste it into the SQLYog blob field viewer. I can use the blob field viewer to load an image from the disk. When all the inventory items are updated with expanded description and product images, I can use SQLYog to export the inventory table as a CSV file for upload to web site inventory engine. However, I need to upload the product images in mass accumulated in a zip file. SQLYog allows me to select the fields to be included in the CSV file and I select all fields and deselect the image blob field. To assemble the image zip file, I could visit each product's image blob field with the SQLYog blob field viewer and select "save to file" and specify the name for the image. Not too bad for a few products but very time consuming for a 2000+ inventory. Code:
Maximizing MySQL Command Line Client Display
I'm using the MySQL command Line Client 5.0 on Windows, and when I maximize the display window of the client it vertically stretches the length of my screen, but horizontally only covers about 2/3 of the screen. It makes the information really difficult to read if, for example, my column names are longer than the space allotted in one line. Is there any way to expand the window size that I'm too new to know about? Or maybe make the font smaller so it doesn't run to the next line? Sorry this is such a basic question, but I couldn't find it in the forum and that makes me think I installed something wrong.
MySQL Command Line Tutorial - New Database Privleges
I'm faily comfortable MySQL, but not at the command line. We have a dedicated server, pre-packaged with MySQL and everthing works fine. It's just that my main user "emed" does not have privledges to make an new Database in PHPMyAdmin. Can anyone point me to a tutorial on doing this sort of thing from the command line?
Mysql Command Line Client Ignores Port Number
I am running 4.1-7 on an SGI (unix.) The server is listening on port 3307. I can connect like: mysql -uusername -ppassword -P123 -hhostname database and I can also connect like: mysql -uusername -ppassword -P3307 -hhostname database and they BOTH connect! It seems that mysql ignores the port number passed in on the command line. Is it reading a config file that I am missing (if so, why doesn't the command line port override whatever is set in this file.)
Error In Command Line: Mysql: Unknown Option '--ansi'
Whenever I try to run 'mysql' from the command line (windows server 2k3), I get the following message: mysql: unknown option '--ansi' This occurs if I try to start mysql with just the mysql command or if i try to specify a user, password, and db.
How To Connect To A Remote Host Using MySQL Command Line Client
I can't establish a connection with a remote host using MySQL Command Line Client. ODBC conn setup successfully. Databases on this remote host can be reached using Crystal Reports. I open MySQL Command Line Client > prompted to enter a password > done successfully so I can connect to local databases. The following is entered to connect to remote host: mysql -h hostname -u myuserid -p but once I hit enter nothing happens.
Command Line Help?
Say I have a column 'apples' with entries: green apples red delicious apples granny smith apples golden delicious apples McIntosh apples Jonathan apples is it possible to run a query looping through all entries (like 1000s of entries) taking out the redundant ' apples' from each entry from the command line?
How Do I Get To The Command Line?
I read an entire book on writing MySQL and PHP without testing everything on the computer at the same time. The code all seemed to make sense to me while I was reading it, but when I finally sat at a computer to enter the code I realized that I had no idea where to begin entering it! How do I get to the "command line" to start using MySQL on Windows XP?
Command Line
If I am running MySQL as a Windows Service, how do I obtain the command line?
Command Line
I'm looking for a command line call that can copy a database table (db1, table1) to another database (db2, table1).I know there has to be an easy way to do this but I can't seem to be able to find the magic syntax.
Command Line
Error You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue: mysql -u oursite_cactiuse -p oursite_cacti < cacti.sql http://monitor.hostingcorral.com/cacti/install/ Where do i put that line at?
Command Line
how to change my mysql password on command line
Command Line
I am trying to run the mysql_fix_privilege_table.sql script but have no knowlege of the mysql commandline. So far i have 'mysql --force < mysql_fix_privilege_tables.sql' but this gives me the 'ERROR 1046 - No Database Selected' how can I select to apply the .sql script to ALL databases? I tried using phpmyadmin but I cant see the option to run scripts
Command Line
I connect from a Windows command line ...mysqlin>mysql myuser mypass and all that ever gets displayed is this help text : Usage: [OPTIONS][database] .... .... .... Variables .... .... .... there's no >mysql prompt after that, it's only mysqlin> So then I reconnect and try adding options or queries but it always does the same thing. I can query from php scripts at http://localhost but the the command line.
Command Line Vs. PhpMyAdmin
I've been trying to read a book called "PHP and MySQL Web Development" by Luke Welling and Laura Thomson. It's pretty dense for me - I'm new at this. In the MySQL chapters its instructions always involve using a command-line interface. When I log into the cpanel for my hosting account the closest thing I can find is phpMyAdmin. Is there a way for me use a command line interface without running my own server? Should I be learning with commands or with phpMyAdmin?
Command Line For Sql Script
I made a script to create a table and insert some values, but I am having trouble executing the correct script after I save it into a *.sql file. What's the command sequence???
Command Line Editing
Using the command below as an example. I would like to know how to properly edit a command after a missed "'" {see [missing"'"]John', 'Smith',... Before I noticed the missed "'" & even though I up arrow & make the change it is done with a cursor line that starts with '> instead of -> (the normal mysql command line) -> INSERT INTO users3 (first_name, last_name, email) VALUES -> (John', 'Smith', 'jsmith@abc.com') '> ****** Here is where i would like to get back to the normal command line ****
Command Line Problems
I have MySQL installed on a local Win2k machine which is running just fine. I have used SQLyog to define additional users with various permissions granted. However, when I use the commmand line program it always starts with "root" predefined as the user. Even after I logout and return, root is still the user. How do I change users with the command line tool? What am I missing here?
@variable From Command-line
I'm trying to figure out if it is possible for me to pass a variable to a SQL file. I'm on Linux The SQL file would look something like: charset utf8; select * from `my_table` where `a_field` = @var; And I would like to be able to change the value of @var on the command-line. Is there anyway to do it, without me having to make an extra program/script for this?
Difficulty With Command Line
I have successfully tested the server with the mysqladmin and mysqlshow commands I succeeded in starting the mysql monitor and got the welcome message My problem now is that when i type show databases on the mysql prompt i get this: -> In fact the show tables and every other command i type at the mysql prompt gives me the same set of characters...what can i have missed doing?
Command Line Login
I am able to login using the following: mysql -u$user -p Enter password: ****** But when I try to login directly from the command line for this user using: mysql -u$user -p***** and I get the following: ERROR 1045: Access denied for user: '$user@localhost' (Using password: YES) I can use my root username and password from the command line and other users. What is the difference with this user?
|