Packed Passwords In Command Line Programs
I think this is a trivial newbie question but can only be answered by a guru.
In command line programs, why should passwords be packed with the parameter name?
For example for mysqlimport one would write the command like that:
mysqlimport -u user -ppass
Why not just
mysqlimport -u user -p pass
?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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 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
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?
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$ .
Command Line Parameters
i want to install the MyODBC driver for windows. i donwloaded the newest installer from the mysql website. -> MyODBC-3.51.06.exe now i know the command line parameter for a silent installation (/s), but i wonder if there are more... Logfile.
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?
My SQL Command Line Client
I started using php/apache/mysql for web development.... questions. Can anyone tell me a good bood to use for learning how to administer mysql. My main interests right now are how to look at the databases from a command line prompt. To see what tables are in the databases. To view their datatypes etc etc.....Basically other then just using mysql... being able to get to the most used commands.. to speed up the learning curve
Command Line Bash
if I use the following at the command line I am asked for the password and then it works: mysql -h myth_host -u mythtv -p -s --exec "select recorded.title from recorded where recorded.chanid=1053" mythconverg now if I use the following with the password it doesn't work mysql -h myth_host -u mythtv -p pword -s --exec "select recorded.title from recorded where recorded.chanid=1053" mythconverg how do I put the password into the command line and have it take it? is there a setting in mysqld that forces this interactive setting?
How To Break In Command-line Tool?
When there are too many results returned from a select query, how can I stop the unfinished displaying of the result? If I press Ctrl-C, the command window will be closed. I just wanna go back to the prompt.
Command Line Querry Execution
MySQL was bundled with other software I purchased, but the manual wasn't included, sad to say... My question is plain and simple: How do I Execute a Querry for MySQL stored in a text file from the commandline in Windows?
Windows Command Line Problem
I have used mysql with PHP and it works fine. for the first time I am using the windows command line and do not know how. When I enter for the first time it asks for password. After that I can't do anything: =============================================== Enter password: **** Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 6 to server version: 5.0.27-community-nt Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> create database test2 -> exit -> =============================================== I want to create a database, add table but how?
Command Line Copy Tables From One Db To Another
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.
Changing The Command-line Editor
Environment ---------------------- Server: SunOS server 5.10 Generic_Patch MySQL: mysql Ver 14.7 Distrib 4.1.22, for pc-solaris2.10 (i386) using readline 4.3 Question -------------------- I log on to my Sun server. At my shell command-line (bash, not that it should matter), I type 'mysql -h localhost -D db1 -u me -p ****' and get to the 'mysql>' prompt. I can view my history by using the up and down arrow keys (or Ctrl-p and Ctrl-n which are emacs commands). Emacs is great, but I have gotten used to vi/vim and want to be able to hit 'Esc' and use 'k' and 'j' to move up and down through my history. I know this can be done because I did it once, somehow. I've tried setting the environment variables: EDIT, EDITOR, and VISUAL to all be 'vi', but it still does not work. How can I make my MySQL command-line editor use 'vi' instead of 'emacs'?
Executing Script From Command Line
I am trying to execute a script from the command line as follows; c:program filesmysqlin>mysql -u root newsman < servers3.mysql But this gives me the following error; ERROR 1064 at line 3: 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 '' at line 1 The script I am trying to use is as follows; update servers; set MaxConnections = 3 where ServerName = 'EasyNews'; update servers; set MaxConnections = 3 where ServerName = 'UsenetServer'; update settings; set SettingValue = 'Yes' where SettingName = 'UseProxy'; "Servers" is a valid field name, and "MaxCommections", "ServerName", "SettingValue" and "SettingName" are all valid fieldnames. What am I doing wrong?
Command Line Syntax For Script
Have a script that creates and populates a table which will execute via the EMS MySQL Mnager Lite interface if you open the database 'test' and run the *.sql script. The *.sql script is located in the 'data' folder which is the parent folder of 'test'. Having opened the database 'test' through the command line, what is the correct syntax to run the script, please?
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.
Loading DB Objects On Command Line
I am creating scripts so that they can load SQL objects, tables, procedures, triggers etc. automatically into the database. Here is the question: when I use 'mysql' command line utility, specifying username, password AND database, do I still have to put 'use dbname' inside the sctipt _OR_ can I assume that the objects will be loaded into the database specified in the command line ?
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.
Command Line Tool With Another User
The command line tool runs fine upon install with the root account, but I've added a new user (newUser1) and am trying to either switch to that user from root in the command line tool or start the command line tool as that user. I can't see how to "switch" once I'm in the tool as root. I've tried --user=newUser1 (but there is no effect) I also went back to the directory where MySQL was installed (C:Program FilesMySQLMySQL Server 5.0in) in the Windows command prompt and tried to run mysql from there: Try #1 = mysql --user=newUser1 --password=xxxxxx newDataBase Result #1 = a listing of a bunch of variables and options related to MySQL, after which time it returns to the Windows command prompt Try #2 = mysql --user=newUser1 (I thought that it might prompt me for the password at that point) Result #2 = ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
Dropping Database From Command Line
I use PHPMyadmin as a front end to administering my databases but my simple question is how do I, from the command line (winxp prompt) drop a certain databse. so once I log into mysql, using mysql -u root, how would I go about deleting whole databases?
Command Line Instructions From A Webpage
Is it possible to run command line instructions from a webpage based file such as PHP or ASP?I am fairly new to MySQL but having found out the possibilities of MySQL there are somethings that I want to do that are normally done from the command line rather than within the MySQL client program. Things like Dumping databases to a textfile or another server can be done using the following (where % is the command prompt): % mysqldump myDatabase states > myTextFile.txt The question is how would I run this same instruction from an ASP/PHP page as a querystring?
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).
Command Line Data Export
I have quite a large normalised database, with a handful of tables. My main user table has about 94,000 records. With this amount of data some queries are taking a couple of seconds to execute. Sometimes when I have a couple of hundread users accessing the site at the same time many of them are waiting ages for their DB query to be executed. This can be seen by viewing all the database processes. The problem is when I try to do a datadump from the command line of my server across multiple tables it takes ages to execute. This means that all queries from my webiste are queued behind it so no users can get access to it until the data dump has completed (which can take about 45 mins to an 1 hour). Is their anyway of running my datadump in a seperate process so it doesn't affect the queries being processed by my web site?
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?
Prob Creating Table From Command Line
new to MySQL (Ver 4), and having a prob creating a table. Running this : C:sokkitmysql4inmysql -u root FLOnline48 < FLO48.Sql The file FLO48.Sql contains : CREATE TABLE flonline48.tblCountry ( CountryID int NULL, CountryShortName varchar (5) NULL, CountryLongName varchar (50) NULL ) Returns : ERROR 1064 at line 1: 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 ' ¦ C' at line 1
|