With the tool "mysql administrator" i get a complete connection to my database, I can change userthings and so on.
But not PHPMyAdmin nor Joomly Installation will get a connection, they timed out.
Any Ideas?
I am playing around with PHPFog and as a result I ended up with a MySql database. I am trying to figure out how to connect to it with a success message.
PHPFog says use this:
mysql_connect(
$server = getenv('MYSQL_DB_HOST'),
$username = getenv('MYSQL_USERNAME'),
$password = getenv('MYSQL_PASSWORD'));
mysql_select_db(getenv('MYSQL_DB_NAME'));
So I basically plug my variables into the above? Or Do I do something different?
Thanks,
Jim
Hello,
I have a CSV file which is about 1GB big and contains about 50million rows of data, I am wondering is it better to keep it as a CSV file or store it as some form of a database. I don't know a great deal about MySQL to argue for why I should use it or another database framework over just keeping it as a CSV file. I am basically doing a Breadth-First Search with this dataset, so once I get the initial "seed" set the 50million I use this as the first values in my queue.
Thanks,
Hi, if an INSERT and a SELECT are done simultaneously on a mysql table which one will go first?
Example: Suppose "users" table row count is 0.
Then this two queries are run at the same time (assume it's at the same mili/micro second):
INSERT into users (id) values (1)
and
SELECT COUNT(*) from users
Will the last query return 0 or 1?
I have turkish character problem in mysql database when adding content with tinymce from admin panel.
Charset is:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9"" />
How can I solve this?
Thanks in advance
I've downloaded the "dbd-mysql-0.4.4.zip" and linked it to my project. While I try to run a demo code from NetBeans the very first line
require "dbi"
gives me an error. Is there a different way to do it?
I also tried
jruby setup.rb config --with=dbi,dbd_mysql
from the command prompt and it gave me the following error:
config: unknown option --with=dbi,dbd_mysql
Try 'ruby setup.rb --help' for detailed usage.
Any suggestions please?
I'm needing to create a MySQL database that is capable repeating events in the exact same way that google calendar repeats events.
What is the best way to structure the table(s) to do this?
I have a timestamp in a mysql table with attribute "ON UPDATE CURRENT_TIMESTAMP". Is there a way to manually disable updating the timestamp on a special occasion? (eg: updating the entry to revise a blog post, but not to re-date it)
I'm changing my dataset in my program. And when my job was finished, I'm connecting to mysql database. I don't want to do this job again, how can I send changings to database like this
mydatadapter.Update(dataset, " table");
I found this code, but I can't run it :S
Hi, I am creating and testing a mysql join query but each time so far it causes the database tables to lockup and the site hangs. I have to then call the host and they kill the locked queries.
Is this something I can do from phpmyadmin so not to bother them while I tweak the script to work? Thanks for any reply.
Hi all
I am new to Php and working on a project which needs to generate sitemaps from URLS which stored in MySQL database. how can I do this?? Is there any one have any idea??
site maps can be in php extension too and only requirement is list of sites display in each page
I'm creating a paging class and need to pass in two parameters to my MySQL stored procedure for the LIMIT clause.
I'm passing them in as INTs and trying something like this
SELECT *
FROM
`MyTable`
LIMIT
MyFirstParamInt, MySecondParamInt
it gives me an error when I try and save the sproc though. Is there a way to do this that I'm just missing? Or am I going to have to EVAL the whole query and EXECUTE it?
this is a strange one.
I have a date, that is converted to mm-dd-yyyy
when posting it to mysql i have re-ordered it to yyyy-mm-dd
but yet it still will not insert
$date = date("Y-m-d", strtotime($_POST['leaving_date']) );
any advice?
Cheers
EDIT
The actual query:
mysql_query("INSERT INTO booking_info (customer_id, booking_ref, date_of_travel) VALUES (".mysql_real_escape_string($_POST['customer_id']).", ".mysql_real_escape_string($rnd).", ".mysql_real_escape_string($date).")");
hello,
anyone can plz help me? i wanted to create pdf file using php and have done it. now i want to create pdf file that get data from mysql table.. i've searched for the sample code for long time but didnt find even a single code related to my query.. thanx in advance
Iam quite new to functions in SQL and I would like to create a function to compare values in a MySQL table against previous and I am not sure how to do this.
For example (iId is the input value)
DECLARE pVal INT(20);
DECLARE val INT(20);
SELECT price INTO pVal FROM products WHERE Id=iId;
SELECT price FROM products;
IF price == pVal THEN
SET val = price;
END IF;
Thanks
which one is the fastest way to completely copy a table on mysql ?
CREATE TABLE copy LIKE original;
INSERT INTO copy SELECT * FROM original;
or
CREATE TABLE copy SELECT * FROM original;
ALTER TABLE copy ADD PRIMARY KEY (id);
or theres another way ?
PS. can't use command-line tools like mysqldump, must be on-the-fly.
I've dabbled in CouchDB and I have pretty good MySQL experience. I've also created
one production application that uses both. I like MySQL but I've run into scaling/concurrency issues with MySQL that CouchDB advertises itself as a general solution for.
The problem is that I have MySQL based applications that are pretty huge, and I don't really know whether it would be a good idea or not to try to port them over to a CouchDB datastore. I don't want to put in a lot of time and effort only to find out that my application is really not a good fit for CouchDB.
Is there any sort of informed consensus on when porting a MySQL
based app to CouchDB is NOT advisable? Any cautionary tales?
I think CouchDB is really cool and want to use it more. I'd also like to know ahead of time what specific types of data querying scenarios CouchDB is really not good for, or if CouchDB can really replace MySQL for all the applications I create going forward.
I am trying to use this MySQL query:
SET @a:=0; UPDATE tbl SET sortId=@a:=@a+1 ORDER BY sortId;
Unfortunately I get this error:
"Parameter '@a' must be defined"
Is it possible to batch commands into 1 query like this, or do I need to create a stored procedure for this?
When I do mysqladmin extended from the command line, my Com_* counters differ completely from doing a show status when consoled into MySQL. Why is this?
Hi all, i have searched Google and also searched Stack Overflow to no avail.
I am looking for a PHP / MySQL driven dynamic image slideshow. One similar to 'lightcyclers.com', i have information stored in the DB and i just want to display random or popular content etc.
I am also not interested in coding one myself as i am busy working on other features.
Any links or help would be much appreciated.
i wonder if there is gui tools for creating a graphical map for the relationship between models/objects (doctrine) or tables (mysql)?
it would be better than draw it manually.
i´ve already have the models/objects and tables created.
Hi,
I'm running a mySQL query that joins various tables of 500,000+ rows. Sometimes it takes a second, other times around 15 seconds! This is on my local machine. I have experienced similarly varied times before on other intensive queries, does anyone know why this is?
Thanks