mysql

How to migrate an old Database into a new Database using Microsoft Access

Basically this task is pretty easy when you think about it... but i found no Answers in Microsoft Access or MSDN. I have to create a connection to an new Database and query the old one. After validating the old data, everything is written in a new fine Form to the my new Database. Any Ideas? Add: Old Database is an Firebird Database. T...

symbolic link to bit bucket

How do I throw the contents of binary log to bit bucket? I tried to create a soft link but it did not work. I do not want to save mysql general log but I want to watch it using tail -f command. ln -s /dev/null /var/log/mysql/mysql-gen.log ln: creating symbolic link /var/log/mysql/mysql-gen.log to /dev/null: File exists ...

Is it possbile to write files with MySQL via SQL injection?

Long story short, we found files promoting prescription drugs on our server that we didn't put there. The Windows server has very old applications and runs MySQL 5.1.11. Beyond other security flaws, could SQL injection be used to write files to the server file system? I am certain that some of these old applications are vulnerable to SQ...

"System lock" in MySQL + MyISAM

I noticed that 'show processlist' on our MySQL server indicates a lot of threads in 'System lock' state, often followed by just 'Locked', the latter which I'd expect since we have some selects locking behind an update/insert on a MyISAM table. But 'System lock' shows up a lot more than just 'Locked' (sometimes adding up to 2 seconds to ...

Still Need To Write a Connection Pool Class in J2EE 6 with MySQL 5?

I'm looking around trying to see if anybody has asked this before. I don't think so. Some of the other questions I've looked at seem to talk about this a bit and indicate that using a JNDI datasource setup in Tomcat is the best way to do database stuff in your J2EE app now. It's been three or four years since I did any serious J2EE dev...

What is MYSQL Partitioning?

I have read the documentation (http://dev.mysql.com/doc/refman/5.1/en/partitioning.html), but I would like, in your own words, what it is and why it is used. Is it mainly used for multiple servers so it doesn't drag down one server? So, part of the data will be on server1, and part of the data will be on server2. And server 3 will "p...

When setting MySQL schema, why use certain types?

When I'm setting up a MySQL table, it asks me to define the name of the column, type of input, and length. My assumption, without having read anything about it, is that it's for minimization. Specify the smallest possible int/smallint/tinyint for your needs, and it will reduce overhead of some sort. If it's all positives, make it unsigne...

Not unique table/alias: 'usertns_group'1066 Please tell me if you spot the error

The code below looks painstakingly long... but pls if u can spot the error, tell me.. I dont see any duplicates of the alias 'usertns_group' so i wonder why im getting that error.. post LEFT JOIN category2 as postcategory2 ON( post.category2_id = postcategory2.category2_id ) LEFT JOIN category1 as category2category1 ON( postcategory2...

BLOB Download Truncated at 1 MB Script Works for Files Less Than 1 MB

I just recently asked and solved a question pertaining to uploading .PDF files that are greater than 2 MB into a MySQL database as BLOBS. I had to change some settings in my php.ini file and MySQLs maximum packet setting. However, fixing this issue has led me to discover a new issue with my script. Now since I can upload files to my ...

Modify Array to Output in JSON using PHP and jQuery

Hello, I'm currently working with the jQuery Autocomplete Plugin. The code they provided in the demonstration is: <?php $q = strtolower($_GET["q"]); $items = array( "Peter Pan"=>"[email protected]", "Molly"=>"[email protected]", ); $result = array(); foreach ($items as $key) { if (strpos(strtolower($key), $q) !== false) { a...

ADO.NET (Sql Compact + MySQL + IBM db2 expressC)

I'm developing an app which will have a central database users can add entries to. The database will have to be on a server somewhere but I want the users to be able to add entries offline. The app will sync to the main db when connection is available. So, I supose I need 2 databases - the main one sitting on a server (preferably linux) ...

SSIS and MySQL - Table Name Delimiter Issue

I am trying to insert rows into a MySQL database from an Access database using SQL Server 2008 SSIS. TITLE: Microsoft SQL Server Management Studio ------------------------------ ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.51a-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv...

Target mysql query response times

As I'm looking to optimize some of my mysql queries and improve performance, I'm realizing that I'm just not sure what sort of response times I should be aiming for. Obviously lower is better, but what do you normally target as a 'slow' query for a consumer site? My queries are currently running between 0.00 to 0.70 seconds. I assume...

Ensuring result order when joining, without using an order_by

I've got a mysql plugin that will return a result set in a specified order. Part of the result set includes a foreign key, and I'd like join on that key, while ensuring the order remains the same. If I do something like: select f.id, f.title from sphinx s inner join foo f on s.id = f.id where query='test;f...

I am trying to do an ASP like repeater in PHP.

<?php $dbhost = 'xxxx'; $dbuser = 'xxxx'; $dbpass = 'xxxx'; $dbname = 'xxxx'; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); $result = mysql_query("SELECT * FROM mytable"); $row = mysql_fetch_array($result) ?> <?php foreach ($rows as $row): ?> <tr align="center"> ...

How do I list all the columns in a table?

For the various popular database systems, how do you list all the columns in a table? ...

Has Anyone Here ever tried PEAR

Hi I have been reading alot of articles adoring the PEAR mail package and it seems like PEAR is something I need to try out. I am interested in setting up a full mail server, similar to a conventional SMTP mail service; which incorporates mail queuing, resending with a backend database etc. My impression is that PEAR can do this but can...

Max Tables & Design Pattern

I am working on an app right now which has the potential to grow quite large. The whole application runs through a single domain, with customers being given sub-domains, which means that it all, of course, runs through a common code-base. What I am struggling with is the database design. I am not sure if it would be better to have a c...

Use Django and MySQL on Windows

I am just starting to get into Python and decided to download the Django Framework as well, I have that working just fine but then I tried to create my first "Django App" (the tutorial at the Django website) and when I ran into the "Database setup" I start having issues I am using Windows 7 and I've always played around with MySQL in WAM...

MySql variables and php

I am getting an error with this in php. What is the correct way to format this string to pass to mysql_query() in php? SELECT count(*) FROM agents INTO @AgentCount; SELECT user_agent_parsed, user_agent_original, COUNT( user_agent_parsed ) AS thecount, COUNT( * ) / ( @AgentCount) AS percentage FROM agents GROUP BY user_agent_parse...