Running Mysql From Shell
I need to run this sort of querys from shell:
delete from 3dinformatica where preco = " " ;
CREATE TABLE tudotest AS SELECT DISTINCT * FROM 3dinformatica;
DELETE FROM 3dinformatica;
INSERT INTO 3dinformatica (cr_datetime,produto,vendedor,preco,link) SELECT DISTINCT cr_datetime,produto,vendedor,preco,link FROM tudotest;
DROP TABLE tudotest;
i wanted to put the mysql cmd in a file like mysql.sh and run it from crontab. i have about 100 querys like that i need to run at the same time.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Running Sql File From Shell Script
When i run the command "mysql -h host - u user - p password -D database <file.sql" (the file.sql contains an Update Scrpit) from command prompt /usr/test> mysql -h host - u user - p password -D database <file.sql i am able to run the file and i am getting expected results. When i copy the same string in a shell script (suppose in update.sh) and try running it from the command prompt /usr/test> . update.sh i get an error as "No file or directory found" i tried giving in the full path of file.sql and tried running hte shell script but it gave me the same results "No file or directory found".
Log Into MySQL Via Shell?
i can't figure out how to log into mysql via the shell. I am using Microsoft Windows 2000 SP4, so I would guess that I have to use the CMD... but I can't figure it out. I have the 'root' user setup and a password set on it... and i know how to control my databases and create tables and modify them and everything in PHP... but i want to know how in the shell so I don't have to create a new php page and execute it every time.
Shell And Mysql
I am trying to run a mysql batch script through the shell. The one problem though is that the error messages out of my script dont go to the redirect i.e., if I run mysql<test.sql>test.log the error messages do no print into test.log, but to the command line. I would like to capture the errors into this log file as well. Any ideas?
Access Mysql Via Shell
I am trying to run queries against a mysql DB, for which I've been provided a uid & pwd, but for this I first have to login as: CODEmysql -u xx -p password: xxxx use dbName; query
Get Shell Throgh Mysql Db
i want to know if its pssosible to gets MS DOS access with MySQL Control Center or another remote control tool for mysql databank
Mysql Shell Startup Script
When starting up the mysql shell, is there a way that I can automatically run a startup-script ? Specifically, I would like to issue a BEGIN WORK everytime I open up the shell. I tried man mysql, but didn't get any the wiser.
Mysql User With Shell Access
Is there any reason the mysql user account in a linux system would need shell access and a password? I thought it was just there to be a very underprivileged user and run the mysqld daemon.
Executing Shell Command From Mysql Query Browser
This works fine when executing the shell command inside the MYSQL in command line mysql> ! ls /home/www/htdocs/test 1000.xml class email test.xml test1.xml test2.xml But when i execute the same with dynamic SQL and executed in TOAD for MYSQL, it throws error SET @vSql:= '! ls /home/www/htdocs/test'; PREPARE vStmt FROM @vSql; EXECUTE vStmt; 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 '! ls /home/www/htdocs/middleware/test' at line 1 Can some one clarify me Whether is that possible to execute the Shell commands from the query browser or it can be only used in the command line?
Shell And Sql Dump
Does anyone know where I can find information on how to setup my shell in unix/linux to allow me to restore a database from an sql dump... I have a database on 83200.mysql.com (example) that I have a file mysql.sql (also just an example). The file was produced using an sqldump command from a web interface... How can I configure a connection if I am not on 83200.mysql.com so that I can import the data into a database with a name of database_wordpress
Linux Korn Shell 93
I have several korn shell scripts I use with a MySQL database on the same server (Solaris). I am moving to a Linux environment where the MySQL database is on another server. I would like to convert the database connection code to connect to the database on another Linux server. I see alot of information on Perl DBI CLI and PHP DBI CLI but cannot find any examples of Korn Shell connecting to a database on another server.Is there a way to accomplish a network connection to a MySQL database from Korn Shell?
Linux Shell Commands
in mysql database upon update on tables mysql should intimate to the OS process that a table got updated... how can we make it? is any ways to do that.... updation should trigger some C or C++ function?
Execute A Shell Command Inside SQL
I wonder if there is anyway you can run a shell command inside SQL. for example "SELECT * FROM table;execute shell command" I had googled around and didn't find anything.
Using Shell Script To Create Tables
I have several dozen tables to create and lots of them have a lot of fields. It is easy to create these tables using MyPHPAdmin or any other GUI tool but I want to make it even easier :|) I wrote this script: CODEmysql -u filepro -pfilePro -e "CREATE TABLE 'eglwms.jose2' ( 'field_01' VARCHAR(10), 'field_02' DECIMAL(9,2) DEFAULT '0.00' NOT NULL, 'field_03' VARCHAR(10) NOT NULL, 'field_04' VARCHAR(10) NOT NULL, 'field_05' VARCHAR(10), PRIMARY KEY ('field_03'), INDEX ('field_04'), UNIQUE ( 'field_01' ), ) COMMENT = 'Ocean Export BL';"
Import Data From Shell Script
I've a comma separated file and would like to use "LOAD DATA LOCAL INFILE..." inside a shell script to import data into a table. Basically, I want the script to connect to database, complete import using "LOAD DATA..." and exit. I understand, rows can be inserted one by one using database handles but I'd like this to be done using "LOAD DATA..." functionality.
Sql Database From Linux Fedora's Shell
How may I restore *.sql databases from linux shell? I've read the use of mysql command I don't have installed. This is a remote server with preinstalled Apache-php-mysql.
Help Please Running Mysql On Os X
I am very new to mysql. I am using the sitepoint book 'Build your own Database Driven Website using PHP and MYSQL. I have installed mysql mysql-5.0.41-osx10.3-powerpc. Under preferences/mysql it indicates that the mysql server is running. When I try to access mysql through the terminal window I get a message - command not found. Or no permissions. I can go to the bin directory and list the contents - they seem to be there. I can't get past page 21/22 Post-installation setup tasks. I am also new to using the terminal window. I suspect I have missed something really basic - any suggestions on how I can get up and running would be much appreciated!
Need Some Help In Getting MySQL Set Up And Running.
I wasn't sure if someone would be able and willing to help me, but I am new to installing MySQL on a Windows 2003 server (actually .. any server), but I am installing it on a Windows 2003 server right now. I also installed a new version of PHP on the same server. Everything looks fine, but when I go to phpinfo.php I don't see anything saying MySQL. (I saw somewhere that if MySQL is installed properly, it should be displayed on the phpinfo.php page.) I am currently trying to set up and run Cerberus Help Desk, but it isn't finding the MySQL database that I installed. So, I would really appreciate it if someone could not just help me via email or postings in here, but actually by using Instant Messenger (AOL, Yahoo! or MSN) to walk me through the set up, testing, etc. so I can get things up and running properly. I was hoping that someone with more experience than I might be willing to help me in this manner.
Could Not Get MySQL Running
I went to MS-DOS to start the MySQL application by typing mysqld into the bin directory of where I installed MySQL but once I did typed the command and pressed enter this is all I got : A moment passed before I am shown the path of bin with no indication of MySQL server started. And also I have installed this as a window service.
Running MySQL 5.0
I've just downloaded and installed 5.0 on my Pc/ win 98se. When I run the program MySQL Command Line Client, it appears to run for a second then disappears. I see the program flash open for a second and then it is gone.Complete newb needs some help.
MySQL 4.1 Running
I've been running mysql 4.1 for sometime and using phpMyAdmin (v2.6.2) to administer the databases. Using php scripts I can also update/insert etc the databases (maintained on my laptop Mac OS X Tiger). Suddenly, I can't get phpMyAdmin to load in the browser. I've also tried other MySQL GUI tools like CocoaMySQL and Navicat....they won't run either. I downloaded and installed phpMyAdmin 2.6.3-pl1 as well but no improvement. Why would mysql run but the admin apps not work?
Running MySQL From A CD-ROM?
I have used PHP and MySQL for a few years now. Just today I can across an application that had a MySQL database running locally off a CD ROM. I did not know this was posible. When the application runs it starts up the MySQL database without the user even knowing they are running it. It is pretty amazing. So I want to do the same thing. Is there any documentation on how to run MySQL locally. I would like to know how to build the database and create tables under these curcumstances.
Running MySQL
I have installed mysql-3.23.54-win and it all seems to have gone OK .... now i want to run it and setup a database. I dont have an icon on the desktop and there is nothing in Start - Programs ..... start it from DOS prompt via C:> C:mysqlinmysql.exe and i get error 2003 cant connect to MySQL server on localhost <10061>
MySQL Is Running, But I Can't Connect
I really need some help with this. MySQL will not start on boot despite everything I've done to make sure that it is set to do so. When I start it as root from a terminal with "/usr/bin/mysqld_safe --skip-grant-tables &" I show several mysqld procs. and one mysqld_safe, but I can't connect: [root@adamsmdk madams]# ps -aux| grep mysql Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html root 3650 0.0 0.1 2276 664 ? S 11:09 0:00 /usr/lib/courier/authlib/authdaemond.mysql start root 3654 0.0 0.1 2316 792 ? S 11:09 0:00 /usr/lib/courier/authlib/authdaemond.mysql start root 3655 0.0 0.1 2276 664 ? S 11:09 0:00...............
Gdb Bus Error When Running App With Mysql 5.0
When linking with mysql 5.0 library, I can't no longer use gdb to debug my app anymore. It cores immediately with a bus error. I've also noticed that the size of the executable is more than doubled compared with one linked with mysql 4.0
Running MySQL In RAMDisk
Have a very large database and due to performance requirements it seems that running MySQL in RAMDisk might be a good solution. Access to the database is through PHP. Any suggestions or experiences?
Running Two MySQL Versions
Actually what I want to do is remove 4.1 because I downloaded 5.0 and installed w/o removing the previous version. I now have port 3307 for 5.0. Is this a problem and how can I change it back to 3306 so e.g. when I use Apache/PHP evrything works?
MySQL Running Very Slow
I have the following INSERT SQL, which runs very slow (For 2 full days it had not done anything) on a 2 processor Compaq machine running Suse Linux. Code:
On What Port Is MySQL Running?
I'm running MySQL on my Mac, and I'm trying to figure out on what port MySQL is running. What can I type into Unix terminal to figure this out? Or can I find out some other way?
Slow Running MySQL?
I'm hoping someone may have an idea what could be causing the slow loading pages of my web-site. I'm not positive, but I'm relatively sure that it's related to a problem with MySQL database. I purchased a program called Sam3 for broadcasting our radio signal over the internet. The software requires the use of MySql in order to set up web pages for our web site. The problem is, that while everything works GREAT (requests can be made from the site, songs can be searched, the history of what we've played shows up) the pages load PAINFULLY slow. Other users of this software have had no such problems so I'm at a loss. I know from testing that the PHP script for the web pages is fine, I have plenty of bandwith both upload and download available on my DSL line, and while the computer running MySQL is behind a router I have tried plugging the DSL line DIRECTLY into the host computer and it makes no difference. For all appearances it seems the problem is that it takes MySQL forever to gather and provide the information needed for these pages. Does anyone have any idea what I should be looking at to solve this problem? I do not know the MySQL program at all, so I get somewhat lost when people start throwing out technical terms, but this has been really frustrating because no one else seems to have the problem and everyone so far has just told me to check the things I've already checked.
MySQL Config Not Running
i'm trying to set up MySQL with IIS 7.0 on Windows Vista Home Premium. After you install MySQL, there's a check box to launch the config app. if i leave it checked, the app does not load. if i try to run the app by double-clicking its icon it gives me an error saying, "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail." I cannot find the application event log, though.
Running Mysql On Old Computers
I“m running mysql on a Pentium 166 Mhz with 16 Mb of RAM. Pretty old, right? I want to know if there is a way to improve performance. I don“t know, something about reducing the number of queries that it will respond or cutting out some features.
Running MySQL In RAMDisk
Have a very large database and due to performance requirements it seems that running MySQL in RAMDisk might be a good solution. Access to the database is through PHP.
Running Two MySQL Versions
It seems that my computer is running two different mysql versions. When I'm trying to login to the database it refuse my password and giving me access to the test configuration. This is what i get in the event viewer. Do you already have another mysqld server running on port: 3306 ? Event id 100. The problem occur when I changed my password for the database. I have turned off Mysql in local services but i think that that's the original version. When I start the xampp i think it starts the winmysqladmin version (not sure). How do I reconfigure the hole thing and how can I see what's running on my machine. I actually have another question to. I'm trying to run and open the shell mysqladmin which doesn't work. It's just a flash, which one of them am I supposed to run?? You have several options like mysqladmin, mysql, mysqld, mysqld-nt....etc. I opened the winmyslqadmin which i think wasn't that good.
Running Backup For Mysql
Can anyone suggest a reliable and inexpensive backup service for mysql? I have about 50 tables, of which I've been doing database backups daily on the server, then downloading the backup every couple days or so. The backup files are starting to get relatively large, and I'd like to find a service to backup to off site.
Running MySQL Win32
I'm an absolute beginner and would really like to read something in the manual to solve this problem, but the manual just take care of Unix and Linux users. Because we develop on NT we wanted to install MySQL with Apache and PHP3 on a NT workstation for faster testing beside our Linux station. But I have problem to start the program (mysql.exe). It just gives back an error: Error 2003: can't connect to MySQL server on localhost 10061 Network is running, I can ping localhost. I don't know what to do to get it running.
MYSQL Running Query On Data Through Php...
I am trying to take address info from 5 different fields in mysql, concatenate them into one string of text and have then run through a POST, like you would in a form, and have them spit out on the other end into the database the Lat and Lon of the address... I can do it manually, but I would like to do it automatically... I would like to know if I am going at this right... Psuedo QUERY=SELECT addressNumber, addressStreet, city, state, zip FROM table $addressStr=addressNumber + " " + addressStreet + ", " + city + ", " + state RUN IT THROUGH A POST SOMEHOW??? and call GEOCODER from my manual insert script... $sql=INSERT INTO table SET lat='$lat', lon='$lon'
MySQL Administrator GUI Running Slowly... WHY?
We have created an instance or schema that contains over 14000 tables. It is a lot of tables. When we attempt to browse the tables in the GUI it literally takes 5 minutes or more for it to come back. Granted when using the Microsoft SQL Server Management Studio it is slow but doesn't take that long. After about a minute or so it gives the list and is kind of slow to scroll. Can this be fixed by optimizing the database? Is this just too many tables for mySQL to handle?
Running MySQL Using A Dos Batch File
I am used to use MySQL on Unix, now I have to do some development for MySQL running on Windows machine. The following script works well in Unix but I am unable to run it on Windows. "MY_FLAG" is the one which is causing issue. Due to certain restriction in my framework, I can use the normal batch by supplying the .sql file while opening the mysql connection ( infact i need to run multiple source files) Code:
How To Verify If MySQL Is Running On My Windows XP?
I uninstalled that and reinstalled that. Then it doesn't work anymore... I check the process of the "Windows Task Manager", but I couldn't find the fimilar mysql-nt.exe... Do you have any idea how should I fix this problem? Should I reinstall the whole XP system?
MySQL + SQL Server 2000 Both Running On XP Pro?
I've had mysql on my machine plenty of times with no trouble currently i have SQL Server 2000 Trial running but never both at once. Unfortunately i have to have them both on at the moment. So before i install and mess everything up, Does anyone here have this setup? I basically want to get php/mySQL/MSSQL running with IIS
Error Running MySQL Administrator On RH8
I have downloaded the latest version of mysql administrator 1.0.18. I followed the installation instructions, but when i am unable to run the program. I get an error saying: ./mysql-administrator-bin: relocation error: ./mysql-administrator-bin: undefined symbol: gdk_display_get_type Do you have any clue about what is happening?
|