mysql

Execution Creates "MySQL server has gone away" Error

I am using a PHP script which is meant to execute continuously for a long time (a one-time mapping script) and insert data into a MySQL database. The script works fine, however, eventually (after a minute or two) it gets an error: MySQL server has gone away I have changed the ini settings for both mysql connection timeout, and for the...

extracting keywords using LDA model

A portion of our project is included here..plagiarism detector.. we are trying to extract common keywords from two input files by comparing each word in file with a database.we created the database and we were able to take word by word from the file and also each row from the table(keyword). now our problem is that the while loop is not...

sql database prefixes

When I create a database on my hostgator webserver, it prepends a database prefix to the database name. for instance if I do CREATE DATABASE 'dbname' it makes a db called myname_dbname My question is, is there a way I can have my PHP get the db prefix so that I can add it into my configuration file? ...

SQL restore and special characters

Dear All, I am using SQLYog for my work. I backup and restore a database. Problem is, when I restore the database all charactes like "à" become funny. I am confused: I am restoring a database on the same machine it was created on. Same dataset. Why does the character corruption happen? How can I fix it? Thanks!!! Sep ...

how Index used in between query

How can get my index work when i query using Between command? when i explain the query: explain select * from table where Date between date1 and date2; the return actual key be used is NULL, how to used my index in this case? I have read some documentation from MYSQL, they said BTree index should be used here in order for > < or be...

MySQL open source reporting services

Hi, I am currently working on a project where reporting services are required. The database back end is built using MySQL and I would like to have something with similar functionality to say SSRS. Does anyone have any experience with an open source solution for this? Any they would particularly recommend? It would have to be accesse...

Peak Mysql. Status a queries "Sending data" and processor loaded on 100%

Server Mysql 5.1.49. The processor was suddenly loaded on 70-80% two days ago, after sleeping for the next day again loaded, and then slept, now the load is not falling. It was found that queries are executed rapidly compared to their sending to the client (in the status of MySQL stands Sending data). In table 3 values greater than 8mln....

how to insert some formula in mysql?

i want to calculating one row at table "counter". i try to make my table like: name black yellow white qty_job total david 1 0 0 2 ? andrew 0 1 1 4 ? the formula to calculate is : total = (nblack * 1) + (nyel...

PHP-Mysql table join from different host.

There is a table employee in the database abc_db at abc@localhost(server) and there is another table department in the database xyz_db at xyz@localhost(server). How can I join the tables using php mysql connection. I have written the following code but it does not generate any resource id. $conn = mysql_connect("localhost","abc","abcdb"...

Problem using oledb datatypes to write data to excel sheet

hi everyone, I am trying insert some data into excel sheet using oledb dataadapter which is obtained from MYSQL Db.This data obtained from mysql db contains very long texts whose datatypes in MYSQL have been defined as(Varchar(1023),Text,Longtext etc).When I try to pass these to the oledb Dataadapter I tried to use oledb.VarWChar,oledb....

50 million node hierarchy or larger

Does anyone out there have any great ideas to achieve a massively scalable hierarchical datastore? It needs rapid add and ability to have many users of site requesting reports on the number of nodes below a certain node in hierarchy. This is the scenario.... I will have a very large number of nodes getting added per hour. Lets say I w...

Mysql format number

How to change number comma separation format in mysql from "," to "." If I have a not fixed length of factorial part of the number. ...

How do you handle deletion of users

Users in our application participate in forums and create various entities. In the schema you mark references from those tables back to the User table as foreign key references. We are unable to remove this user entry from the database, since it has several foreign key constraints which can be removed. One way of addressing would be t...

Help in choosing the right type of database

Hi, As part of my learning, i am developing a google maps V3 application, to allow people to upload real estate and rental listings. I would like to know what database should i use? I am quite confused as i have researched mysql, coudb, cassandra, maria db and a whole lot more, the issue is that everyone has a + and - things to say wit...

SQL : return value in required format

select myvalue from mytable where id=1; it return a value of 10 digits(Ex: 1234567890). I want these value in 1234.56.7890 format as return value. means myvalue can return value in required format and not in stored format. Can anyone help me. You ideas are very wellcome ...

checking month name against unix timestamp stored in mysql db (using php)

Having trouble working out how to do the following - I want to list all the events for a given month, with each event having a date stored as a unix timestamp in the database. In my sql query, I have to manipulate the timestamp so that i can check if the date is in the same month as the month string i'm comparing against, e.g "october". ...

Ignoring HTML entity for ampersand in MySQL Full-Text Search

I have a lot of data that is being entered into records with the HTML entity &amp;. A full-text search for the word "amp" will result in records containing &amp; to be shown, which is highly undesirable. Presumably this is because MySQL ignores the '&' and the ';'. So does anyone know of any way within MySQL to force it to treat special...

Dump some mysql tables (structure + data) in C#

How can I dump some of the tables from my mysql database into an sql file in C#? Is there a class which does this? UPDATE: just wanted to mention to DO NOT USE mysqldump, because this application will be installed on many computers and the mysql folder could be on different places. ...

MySql and MsSQl backup with code

I try to back up from MySQL with codes. Is it possible? If it will possible, I could use this code getting backup from MsSQL. Thank a lot. ...

mysqldump and restore with special characters. øæåØÆÅ

Locally I do this to dump and move a database, upgrading silverstripe 2.3 to 2.4: mysqldump --opt --default-character-set=latin1 --skip-set-charset --user=$root -p$password $oldDatabase -r db.sql iconv -f LATIN1 -t UTF8 db.sql > db_utf.sql CREATE DATABASE $newDatabase CHARACTER SET utf8 COLLATE utf8_swedish_ci; FLUSH PRIVIL...