Search Results

Search found 36111 results on 1445 pages for 'mysql update'.

Page 81/1445 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • Improve long mysql query

    - by John Adawan
    I have a php mysql query like this $query = "SELECT * FROM articles FORCE INDEX (articleindex) WHERE category='$thiscat' and did>'$thisdid' and mid!='$thismid' and status='1' and group='$thisgroup' and pid>'$thispid' LIMIT 10"; As optimization, I've indexed all the parameters in articleindex and I use force index to force mysql to use the index, supposedly for faster processing. But it seems that this query is still quite slow and it's causing a jam and maxing out the max mysql connection limit. Let's discuss how we can improve on such long query.

    Read the article

  • Improve long mysql query

    - by John Adawan
    I have a php mysql query like this $query = "SELECT * FROM articles FORCE INDEX (articleindex) WHERE category='$thiscat' and did>'$thisdid' and mid!='$thismid' and status='1' and group='$thisgroup' and pid>'$thispid' LIMIT 10"; As optimization, I've indexed all the parameters in articleindex and I use force index to force mysql to use the index, supposedly for faster processing. But it seems that this query is still quite slow and it's causing a jam and maxing out the max mysql connection limit. Let's discuss how we can improve on such long query.

    Read the article

  • Copying a mysql database from localhost to remote server using mysqldump.exe

    - by Ankur
    I want to copy a mysql database from my local computer to a remote server. I am trying to use the mysql dump command. All the examples on the internet suggest doing something like The initial mysql> is just the prompt I get after logging in. mysql> mysqldump -u user -p pass myDBName | NewDBName.out; But when I do this I get You have an error in your SQL syntax; check the manual that corresponds ... to use near 'mysqldump -u user -p pass myDBName | NewDBName.out' Since I have already logged in do I need to use -u and -p? Not doing so gives me the same error. Can you see what is wrong?

    Read the article

  • MySQL and SQLite differences in SQL

    - by Darth
    I'm writing java application that is using both SQLite and MySQL using JDBC. Are there any differences in SQL for those databases? Can I use same queries for both SQLite and MySQL, or is there any db specific stuff, that doesn't work on the other one? As far I've worked only with MySQL, so I don't really know much about SQLite.

    Read the article

  • MySQL on Windows 7 multiple connections issue.

    - by Hussain
    I just installed MySql on windows 7 ... issue is i'm unable to get multiple connection to MySql . If I connect with command line than i'm unable to connect through any other client and vice versa. Previously I was using same version of MySql i.e. 5.1 on vista and it was working fine.

    Read the article

  • Run multiple sql files in mysql batch

    - by hmak
    to run a single file you can run in mysql .\ filename or you outside of mysql you can run mysql < filename I have a directory of sql files so I'm trying to run them all at once by using a wildcard *.sql but it doesn't work. Any ideas?

    Read the article

  • MySQL Path Detection, Command Line

    - by swt83
    I have a script that I want to run via command line. In setting up the command to run, I am trying to do a detection for the MySQL path. When I type "which mysql" in my terminal, I get an answer. When I run PHP -- $path = exec('which mysql'); -- I get nothing. If I do the same command for "which php" I get an answer, but not MySQL. Why would I get a response from terminal and not from PHP CLI on this?

    Read the article

  • Rails 3.2.3 mysql error "max_prepared_stmt_count"

    - by Rob Momary
    I am running a Rails 3.2.3 app deployed with apache2/passenger on a virtual host with a mysql database server. I got this error after a lot of traffic was hitting the site: ActiveRecord::StatementInvalid (Mysql::Error: Can't create more than max_prepared_stmt_count statements (current value: 16382) I'm thinking it has something to do with the amount of traffic, but if so I have to find a way around this. Anyone had this error before? I can't figure out how to stop it. Here's what i see in mysql: mysql show global status like 'com_stmt%'; | Com_stmt_close | 1720319 | Com_stmt_execute | 2094137 | | Com_stmt_fetch | 0 | | Com_stmt_prepare | 1768924 | | Com_stmt_reprepare | 0 | | Com_stmt_reset | 0 | | Com_stmt_send_long_data | 0 | +-------------------------+---------+ I am running resque gem.

    Read the article

  • Accessing MySQL server via VPN in python

    - by user210481
    Hi I have a MySQL server that I need access through a VPN. I use MySQLdb package to access MySQL server in Python. When I can access the server without VPN, it works fine, but when I'm at certain locations, I need to connect through VPN. My computer is connected to the VPN and I can access the database through PHPMyAdmin, but MySQLdb gives me an error message: OperationalError: (2003, "Can't connect to MySQL server on 'MY_IP' (10061)") Any ideas on why it's not working? Thanks

    Read the article

  • CakePHP: What to use for MySQL users & permissions?

    - by Steve
    I'm getting ready to deploy a CakePHP site for the first time. I'm using the site with a MySQL database, and I'm still a little unclear about the proper use of users & permissions for MySQL -- I'm talking about the "login" and "password" fields that appear in app/config/database.php. During development, I've been using 'root' and 'root' -- but I'm pretty sure that can't be a good idea. So my question is: what are the best practices for assigning a MySQL user to a CakePHP app, and what MySQL privileges should be assigned to it?

    Read the article

  • Simulating MySql OLD_PASSWORD in .NET or MS SQL ?

    - by miensol
    I have started a new project in .NET which uses some old system's datababase in MySql. The data stored in mysql is periodicaly transfered to MS Sql on which our system works. I need to authenticate users with their login and password. User's passwords are stored as hash generated by OLD_PASSWORD function from mysql. Is there any way to generate such hash using Ms Sql or .NET ?

    Read the article

  • MySQL Split Time Ranges into Smaller Chunks

    - by Neren
    Hello all, I've recently been tasked with finishing a PHP/MySQL web app when the developer quit last week. I'm no MySQL expert, so I apologize if this is an intensely simple question. I've searched SO for the better part of two days trying to find a relatively easy solution to my problem, which is as follows. Problem in a Nutshell: I have a MySQL table full of start and end datetime (GMT -5) & UNIX Timestamp values covering durations of irregular length and need to break/split/divide them into more-regular time chunks (5 minutes). I'm not after a count of row entries per time chunk/bucket/period, if that makes any sense. Data Example: started, ended, started_UNIX, ended_UNIX 2010-10-25 15:12:33, 2010-10-25 15:47:09, 1288033953, 1288036029 What I'm hoping to get: 2010-10-25 15:12:33, 2010-10-25 15:15:00, 1288033953, 1288037700 2010-10-25 15:15:00, 2010-10-25 15:20:00, 1288037700, 1288038000 2010-10-25 15:20:00, 2010-10-25 15:25:00, 1288038000, 1288038300 2010-10-25 15:25:00, 2010-10-25 15:30:00, 1288038300, 1288038600 2010-10-25 15:30:00, 2010-10-25 15:35:00, 1288038600, 1288038900 2010-10-25 15:35:00, 2010-10-25 15:40:00, 1288038900, 1288039200 2010-10-25 15:40:00, 2010-10-25 15:45:00, 1288039200, 1288039500 2010-10-25 15:45:00, 2010-10-25 15:47:09, 1288039500, 1288039629 If you're interested, here's the quick & dirty on the app and why I need the data: App overview: The application receives very simple POST requests generated by a basic sensor device when its input pins go to ground, which submits an INSERT query to the database where MySQL records a timestamp (as started). When the input pins return from a grounded state, the device submits a different POST request, which causes the PHP app to submit an UPDATE query, where a modification time timestamp is inserted (as ended). My employer recently changed the periodic reporting unit of measure from Seconds "On" Per Day to Seconds "On" Per 5 Minute Interval. I had formulated what I thought would be a workable solution, but when I looked at it on paper, it looked like Rube Goldberg's nightmare constructed in MySQL, so that was out. Any suggestions as to how to break these spans into 5 minute blocks? Keeping it all in MySQL would be my preference, though I'll take any suggestions. Thank you for any suggestions you may have. Again, I apologize if this is a no-brainer. If I ask any additional questions of the SO collective consciousness in the future, I'll try to word them a bit better. Any help will be happily welcomed. Thanks, Neren

    Read the article

  • Connect to MySQL via PHP script tunnel

    - by Neo
    Here's the question, I need to connect to a remote MySQL database from my C# Application, problem is the MySQL instance will block all access to all IP's apart from localhost, this can not be changed as its too much of a security issue. The question is, is it possible to connect via a tunnel instead to a php script hosted on the server, this would then act as the mysql connection. Any ideas and suggestions?

    Read the article

  • MySQL Master/Slave with Castle Activerecord

    - by Kynth
    I have an existing web application using Castle Activerecord to interact with a single MySQL database. The Database has recently been reconfigured to replicate to a number of Slaves. How do you configure Castle Activerecord to direct writes to the MySQL Master and reads to the MySQL Slaves?

    Read the article

  • MySQL ODBC error "server has gone away"

    - by digitala
    Occasionally we're seeing an error from ASP pages: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [MySQL][MyODBC 5.00.11][MySQL] 2006 MySQL server has gone away We're handling it the best way we can in ASP but it still crops up. I think it's more to do with the MySQL ODBC driver than the ASP code. We never see this with PHP code we also have running under the same IIS server, however PHP re-connects each time it is ran, whereas I believe the ODBC driver connects once and stays connected. I've checked the settings in the driver but there doesn't seem to be anything I can change to help mitigate the problem. Can anyone explain why this is happening and how to reduce the number of times it happens?

    Read the article

  • Databases: Migrate data between MS Access DB and MYSQL

    - by Dean
    Hello, I have 2 databases, one is MS Access DB from an old website, and the other one is MYSQL from the new Joomla+VirtueMart based website. I need to migrate existing products from MS Access to MYSQL. I thought of putting both on server and writing SQL queries in MYSQL workbench, untill I have a good script for that, but I'm very new to SQL, so I'd rather avoid that. I there a better way and more efficient for that?

    Read the article

  • Recipe for creating a corrupt mysql table

    - by Chaim Geretz
    We had a process that crashed while trying to manipulate an expected mysql record set, running the offending query from the mysql cli showed the following. mysql SELECT ...; ERROR 1030: Got error 127 from table handler Is there a way to easily recreate this condition so we can validate our fix ? (production DB was already repaired).

    Read the article

  • Multiple Rails app, single MySQL database

    - by Gaius Parx
    I intend to have multiple Rails apps each for site.com, api.site.com, admin.site.com. All apps will access the same tables from one single MySQL database. Apps and database runs in the same server. Is there any settings in Rails, ActiveRecord or MySQL that I need to be concerned about for above access scenerio? Thanks Running: Rails 2.3.5, MySQL 5.0, Nginx, Passenger, RubyEE

    Read the article

  • MySQL server has gone away

    - by user491992
    Hello Friends, I executed this query on my MySql Server and it is giving me "MySQL server has gone away" Error.In following query my both table have more then 1000000 rows. SELECT a_tab_11_10.url as url,a_tab_11_10.c5 as 't1',a_tab_12_10.c3 as 't2' FROM a_tab_11_10 join a_tab_12_10 on (a_tab_11_10.url)=(a_tab_12_10.url) order by (a_tab_11_10.c5-a_tab_12_10.c3) desc limit 10 here is my log file but i am not getting it. Thank you @Faisal for answer and i check my log file but i am not getting it.. 110111 10:19:50 [Note] Plugin 'FEDERATED' is disabled. 110111 10:19:51 InnoDB: Started; log sequence number 0 945537221 110111 10:19:51 [Note] Event Scheduler: Loaded 0 events 110111 10:19:51 [Note] wampmysqld: ready for connections. Version: '5.1.36-community-log' socket: '' port: 3306 MySQL Community Server (GPL) 110111 12:35:42 [Note] wampmysqld: Normal shutdown 110111 12:35:43 [Note] Event Scheduler: Purging the queue. 0 events 110111 12:35:43 InnoDB: Starting shutdown... 110111 12:35:45 InnoDB: Shutdown completed; log sequence number 0 945538624 110111 12:35:45 [Warning] Forcing shutdown of 1 plugins 110111 12:35:45 [Note] wampmysqld: Shutdown complete 110111 12:36:39 [Note] Plugin 'FEDERATED' is disabled. 110111 12:36:40 InnoDB: Started; log sequence number 0 945538624 110111 12:36:40 [Note] Event Scheduler: Loaded 0 events 110111 12:36:40 [Note] wampmysqld: ready for connections. Version: '5.1.36-community-log' socket: '' port: 3306 MySQL Community Server (GPL) 110111 12:36:40 [Note] wampmysqld: Normal shutdown 110111 12:36:40 [Note] Event Scheduler: Purging the queue. 0 events 110111 12:36:40 InnoDB: Starting shutdown... 110111 12:36:42 InnoDB: Shutdown completed; log sequence number 0 945538634 110111 12:36:42 [Warning] Forcing shutdown of 1 plugins 110111 12:36:42 [Note] wampmysqld: Shutdown complete 110111 12:36:52 [Note] Plugin 'FEDERATED' is disabled. 110111 12:36:52 InnoDB: Started; log sequence number 0 945538634 110111 12:36:52 [Note] Event Scheduler: Loaded 0 events 110111 12:36:52 [Note] wampmysqld: ready for connections. Version: '5.1.36-community-log' socket: '' port: 3306 MySQL Community Server (GPL) 110111 12:37:42 [Note] wampmysqld: Normal shutdown 110111 12:37:42 [Note] Event Scheduler: Purging the queue. 0 events 110111 12:37:42 InnoDB: Starting shutdown... 110111 12:37:43 InnoDB: Shutdown completed; log sequence number 0 945538634 110111 12:37:43 [Warning] Forcing shutdown of 1 plugins 110111 12:37:43 [Note] wampmysqld: Shutdown complete 110111 12:37:46 [Note] Plugin 'FEDERATED' is disabled. 110111 12:37:46 InnoDB: Started; log sequence number 0 945538634 110111 12:37:46 [Note] Event Scheduler: Loaded 0 events 110111 12:37:46 [Note] wampmysqld: ready for connections. Version: '5.1.36-community-log' socket: '' port: 3306 MySQL Community Server (GPL)

    Read the article

  • MySQL updating a field to result of a function

    - by jdborg
    mysql> CREATE FUNCTION test () -> RETURNS CHAR(16) -> NOT DETERMINISTIC -> BEGIN -> RETURN 'IWantThisText'; -> END$$ Query OK, 0 rows affected (0.00 sec) mysql> SELECT test(); +------------------+ | test() | +------------------+ | IWantThisText | +------------------+ 1 row in set (0.00 sec) mysql> UPDATE `table` -> SET field = test() -> WHERE id = 1 Query OK, 1 row affected, 1 warning (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> SHOW WARNINGS; +---------+------+----------------------------------------------------------------+ | Level | Code | Message | +---------+------+----------------------------------------------------------------+ | Warning | 1265 | Data truncated for column 'test' at row 1 | +---------+------+----------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT field FROM table WHERE id = 1; +------------------+ | field | +------------------+ | NULL | +------------------+ 1 row in set (0.00 sec) What I am doing wrong? I just want field to be set to the returned value of test() Forgot to mention field is VARCHR(255)

    Read the article

  • MySQL problem reconnecting (mysqld.exe) keeps giving error...

    - by Ronedog
    Need some guidance figuring out what went wrong. I've been using mysql, phpmyadmin for just under a year on my home computer while I develop a webapp. 3 days ago I updated my windows vista with all the "wonderful" microsoft updates, security patches, etc...and now it's broke. I tried uninstalling all the upgrades, but there are 4 of them I can't unistall because microsoft says their "operating system" updates and can't be unistalled. My system is: windows vista, php 5+, mysql 5.1, Apache 2+. I can run my web app and it queries the database without any problems. However, when I run phpmyadmin to get into the database I get an error: "mysqld.exe has stopped working" and phpmyadmin crashes. I tried going to the command line for mysql to do a mysqldump to backup my database and it gives me an error "2013, could not connect to the server". If I restart the computer the webapp will work again. Basically, php can query the database, but if I try to get at the database through phpmyadmin, or the command prompt the mysqld.exe error occurs and blows mysql out. Any ideas what's going on here? Any ideas how to get around this to backup the db, so I can reinstall mysql?. I'm really lost where to start. I don't really know if the updates caused the problem, or if the 4 updates that can't be unistalled are really the problem. Any tips will be appreciated. thanks.

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >