mysql

C# and MySql integration

How well does C# integrate with MySQL ? I am planning to write a small desktop application that connects to a Database and displays records. Is C# and MySQL a good combination ? Should I use Java Swings and MySQL ? Thanks in advance ...

MySQL storage engine decision

Hello,I am a web designer from the Netherlands. I am sort of new to building web apps from scratch, i have always used CMS, and customized them. I am building a Auction website in php/mysql, which is finished. Recently i read a few articles about storage engines. I have a few question that have been bothering me for a while now: ...

MySQL: how do I see which config files are used?

In order to reinstall my MySQL database, I deleted /etc/my.cnf But what are the default settings of MySQL? And how do I see which configuration files are in use? I can see that mysql --help gives me a list of the current settings. But my real problem here is that I want to modify local-infile and max_allowed_packet. The help text also...

Automatic Database reads/write every second

I am making an auction website, which has an auto-bid system. This system lets people make biddings without having to be there. My question is how to implement such a system. I have made the php files and everything is ready, I've made a html page which refreshes every second. It works, but I'm wondering if there's a better solution. T...

undefined index

when accessing a set of information in a database i am then trying to print the names, however i get an undefined index error: $val= mysql_query("select * from country"); while($row = mysql_fetch_array($val)){ echo $row['country']; } i think it maybe to do with not check if isset correctly, is there an example related ot this tha...

setting up virtualenv for django development on windows,

Hi, Setting up a virtualenv for the first time, when i try to install MySQL-python using pip -E <<some virtual env>> install MySQL-python i get File "setup_windows.py", line 7, in get_config serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key']) WindowsError: [Error 2] The system cannot find the file ...

PDO execute problem

I have faced a problem .I want to select all rows by executing this function: public function executeQuery($query,$fetch_mode=null) { $rs = null; if ($stmt = $this->getConnection()->prepare($query)) { if ($this->executePreparedStatement($stmt, $rs,$fetch_mode)) { return $rs; } ...

How to find in MySQL the nearest (time wise) entry to a given date when only given year or only year and month?

This is very similar to a question that has already been answered (that I can't re-find right now) but the answers only let you get the nearest entry when you have a full date (year, month and day). ...

MySQL users: When localhost changed to %, I cannot login

Hi, I am developing an app with MySQL. I have MySQL (XAMPP) running on my PC. All works fine but now I want to let other users from our network to login, but I found out that when I change user property "localhost" to % (any computer) I get access denied even with my own account. So, in the short, everytime I change "localhost" to "%" (a...

How to find the text field data has \n ?

How to find the text field data has \n in mysql? for ex : field : address :asfalghaln asdgl sdnslbvaslcbn address2 : adsadas phone :2323 How to find the address has \n or not ? in mysql ...

MySql connection, can I leave it open?

Is it smart to keep the connection open throughout the entire session? I made a C# application that connects to a MySql database, the program both reads and writes to it and the application has to be running about 10 hours a day non-stop. Are there any risk attached to keeping the connection open instead of calling the close() function ...

Copy multiple records using foreign keys

Suppose I have two tabels, A and B, each with three columns (A.id, A.title, A.text and B.id, B.a_id, B.text). B.a_id is a foreign key to relates to A.id. Now, suppose there is one record in A (1, 'foo', 'bar') and 2 records in B (1, 1, 'test') and (2, 1, 'test1'). My question is, is there a standard method of copying the record in A, a...

I can not recover my all privileges in PhyMyAdmin

I am using PhpMyadmin. I canceled some structure privileges of the user root this afternoon and I want to recover these privileges. I always log in to PhpMyAdmin with the user identity of "root". But I get an error message when I attempt to recover my all privileges. Error SQL query: Edit GRANT ALL PRIVILEGES ON * . * TO 'root'@'loca...

A table that shows MySql data, which the user can edit.

Hi all! I'm working on a C# application and need to give the users a user-friendly environment to work in. The idea is that a user uses his/her id and password so only data relevant to the user will show up in a table. I've figured out how to do this but now the user needs to be able to edit the contents of the table and since it's all ...

Problem in utf-8 encoding PHP + MySQL

hi,i moved data from mysql 4 (they were originally set to latin2 encoding) to mysql 5 and set encoding to utf-8. It looks good in phpMyAdmin, utf-8 is ok. But there are question marks instead of some characters on website! website encoding is also set to utf8 so i dont understand where is the problem. PHP and HTML files are also set to ...

How to start MySQL with --skip-grant-tables?

I locked my root user out from our database. I need to get all privileges back to the root user. I have my password and I can log in to MySQL. But the root user has no all privileges. ...

mysql encoding problems

I am dealing with some external APIs, and when I save to the db, I am receiving some encoding errors, All the content I am dealing with is in unicode; but the mysql encoding is set ti latin1. It seems to work fine on my local system, but throws error on the server. The only difference between the environments is that the local runs pyth...

Data sync with vb.net and php

I have a windows application and a php web application(not connected to internet all times), eventually data add/remove/update can happen at either places. So data has to be synchronized every day or manually. I have a small sqllite database file (less than 500K) in my end, and the php web app uses Mysql, the structures remain the same....

MySQL: Fill with random iterated position values

I suppose this will be easy to MySQL pros. Given an existing filled MySQL-InnoDB table like key1 | key2 | foobar | position where key1 and key2 together make up the primary key, and position is mostly still NULL, with what SQL would I best fill the "position" field with a randomly ordered but iterated integer value? E.g. if there were...

How can I change database name in mysql ?

How can I change database name in mysql ? My Database name is SPM and I want to change it to spm(small letters) I tried using RENAME DATABASE SPM TO spm; and am getting following error message: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synt...