Php/mysql: can't write to mysql database [SOLVED]

I'm writing a login script using php and mysql. I got it to work on my server about a week ago, and then I set up apache, php and mysql on my netbook so that I could take my code with me and test it. Now it doesn't work. My registration script doesn't write to the mysql database but has no errors. Here is register.php:
<?php
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "swordfish");
define("DB_NAME", "users");
define("TBL_USERS", "users");
$connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection) or die(mysql_error());
function addUser($username, $password)
global $connection;
$password = md5($password);
echo("adding $username,$password<br />");
$q = "INSERT INTO " . TBL_USERS . " VALUES ('$username', '$password')";
echo("query: $q<br />");
$result = mysql_query($q, $connection);
echo("$result<br />");
if (isset($_POST["reg"]))
addUser($_POST["username"], $_POST["password"]);
echo("<a href='index.php'>click here to login</a>");
?>
<html>
<head>
<title>Register</title>
</head>
<body>
<form method="Post" name="login">
<input type="text", name="username" /> Username<br />
<input type="text", name="password" /> Password<br />
<input type="submit" name="reg", value="Register" />
</form>
</body>
</html>
and here is the output (without the form):
adding lexion,6f1ed002ab5595859014ebf0951522d9
query: INSERT INTO users VALUES ('lexion', '6f1ed002ab5595859014ebf0951522d9')
Also, I tried manually adding the content to the database:
$ mysql -p -u root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version 5.1.42 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> users
-> INSERT INTO users VALUES('lexion', 'foo')
-> ^D
-> Bye
I would assume that I got something wrong with the last bit, but the php script seems like it should work. Does anybody know why it doesn't?
Last edited by Lexion (2010-01-10 19:04:15)

What is wrong with your PHP? Why do you think it is failing? An INSERT query doesn't return anything. Also, it's a good idea to specify which fields you are inserting into, unless you want to have to provide something for every field (tedious for tables with many fields with default values). eg:
$q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('$username', '$password')";
As for your experiment with the mysql prompt; queries have to end with a semicolon. PHP is nice and hides that little detail from you.
edit: Also, you're echoing text out before the HTML starts. That won't produce valid HTML. I also noticed a few other things which I corrected; look at my comments:
<?php
define("DB_SERVER", "localhost");
define("DB_USER", "root");
define("DB_PASS", "swordfish");
define("DB_NAME", "users");
define("TBL_USERS", "users");
$connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
mysql_select_db(DB_NAME, $connection) or die(mysql_error());
function addUser($username, $password)
global $connection;
$password = md5($password);
// echo("adding $username,$password<br />"); - Don't echo stuff before HTML starts.
// Also, clean up user-supplied data before plugging it into a query unless you want to be vulnerable to SQL injection.
$cleanusername = mysql_real_escape_string($username, $connection);
$cleanpassword = mysql_real_escape_string($password, $connection); // Obviously you'd generally use some hashing algorithm like md5 or sha1 for passwords
$q = "INSERT INTO `" . TBL_USERS . "`(`username`, `password`) VALUES ('{$cleanusername}', '{$cleanpassword}')"; // The backticks tell MySQL not to interpret any text within as a keyword (good for field names, eg a field called `date`. The curly brackets tell PHP that the stuff within refers to a variable; it's nice as PHP knows exactly what the variable name is with no possible ambiguity.
// echo("query: $q<br />");
$result = mysql_query($q, $connection);
// echo("$result<br />"); - This won't do anything; in addition to INSERT queries not returning anything, the $result variable doesn't contain the results of the query, it's a pointer to them for use with mysql_result().
?>
<html>
<head>
<title>Register</title>
</head>
<body>
<?php
if (isset($_POST["reg"]))
addUser($_POST["username"], $_POST["password"]);
echo("<a href='index.php'>click here to login</a>");
?>
<form method="Post" name="login">
<input type="text" name="username" /> Username<br />
<input type="text" name="password" /> Password<br />
<input type="submit" name="reg" value="Register" />
</form>
</body>
</html>
<?php
mysql_close($connection); // Not strictly needed, as PHP will tidy up for you if you forget.
?>
Last edited by Barrucadu (2010-01-10 17:34:20)

Similar Messages

  • Can Read but Can't Write to a Database

    hi...i'm fairly new to java and have a problem w/ a database program i have written...i'm running windows xp along w/ access xp...the program i wrote works fine on my computer, however, the program is for my brother and on his computer it only reads from the database but can't write to it...unfortunately i packed the program in a jar file so when u run the program no console comes up to display the exceptions...he is running windows 98 (first edition) and doesn't have any version of access on his computer...i figure his odbc driver is out of date or something like that but i wouldn't know where to start to tackle this problem...any help w/ be very much appreciated...thank you...

    Ask him to start the app via the command line/redirect (see [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#setErr(java.io.PrintStream)]System.setErr() to a file, or use a better logging method than you are now (more info in the catches, use [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/package-frame.html]java.util.logging ).

  • I can't write to usb stick [solved]

    I've installed arch on my notebook yesterday. It took a few hours, but I got almost everything working correctly.
    My issue is that when I plug in a usb stick, it gets automatically mounted, but I can't write to it.
    I had the same issue with my ntfs data partition, but I solved it by adding an entry to /etc/fstab.
    Unfortunately that won't be  an efficient solution for usb sticks, since their partition type might vary.
    /dev/sda1: LABEL="arch" UUID="6c7ecf62-2ffb-4bfe-9af0-39d7cdb89751" TYPE="ext4" PARTUUID="000e19e1-01"
    /dev/sda2: LABEL="swap" UUID="ff87fb8b-773b-45ca-9198-c2abf9a1a017" TYPE="swap" PARTUUID="000e19e1-02"
    /dev/sda3: UUID="AAACDC9DACDC657B" TYPE="ntfs" PARTUUID="000e19e1-03"
    /dev/sda4: LABEL="Dados" UUID="EC60740C6073DC30" TYPE="ntfs" PARTUUID="000e19e1-04"
    /dev/sdb1: UUID="2013-11-01-08-10-26-00" LABEL="ARCH_201311" TYPE="iso9660" PTUUID="0d738582" PTTYPE="dos" PARTUUID="0d738582-01"
    [hfluz@hfluz-arch ~]$ sudo fdisk -l
    Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x000e19e1
    Device Boot Start End Blocks Id System
    /dev/sda1 2048 398753791 199375872 83 Linux
    /dev/sda2 398753792 402948095 2097152 82 Linux swap / Solaris
    /dev/sda3 402948096 1399447551 498249728 7 HPFS/NTFS/exFAT
    /dev/sda4 1399447552 1953519615 277036032 7 HPFS/NTFS/exFAT
    Disk /dev/sdb: 14.8 GiB, 15879634944 bytes, 31014912 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x0d738582
    Device Boot Start End Blocks Id System
    /dev/sdb1 * 0 1056767 528384 0 Empty
    /dev/sdb2 84432 147919 31744 ef EFI (FAT-12/16/32)
    My usb stick is /dev/sdb.
    Anyone already had the same problem?
    Last edited by hfluz (2013-11-11 16:40:38)

    MW wrote:Check your groups, you should be in the storage group.
    https://wiki.archlinux.org/index.php/Users_and_Groups
    I don't think that the storage group covers this.  All USB storage devices that I have seem to come up as being part of the disk group.  You should really not make your user part of the disk group.
    If you read the post, and saw the info provided by the OP, you would see that he/she is trying to write to an iso, which is read-only.

  • How can I write to 4 different tables in database at the same time

    I have .mdb file which has 4 tables for each hardware, I have a labview main program which calls 4 sub programs for each hardware, all these 4 subprograms run parallely.
    One might finish one test early or late by milli seconds or seconds, the data has to be written to database file which has 4 tables inside.
    I am planning to open reference in main program and use the reference in sub programs, I will write to Table 1 for first sub program , table 2 for second sub program and so on,
    My question is can we write into one database file having 4 tables parallely/simulataneously? If no why?

    Try it.  It should work.  As long as you are opening the database once, and passing the reference around, I don't see how it would not work. 
    You may run into troubles if two subvi's are trying to write simultaneously.  If so, use semiphores to lock out the action until done. 
    Or you could use a producer consumer architecture where the producer would queue up the table name and data, and the consumer would write to the database.  The producer can be replicated in each subvi.  In other words, each subvi will contain its own enqueue code.  All subvi's and the consumer loop would have to run in parallel.
    - tbob
    Inventor of the WORM Global

  • Can I connect to MySQL database

    sorry for my English...
    I'm absolutely new in Flex
    can I connect to MySQL database?
    I read here that I need to create a java class file and edit
    an xml to create connection to oracle, can I connect to MySQL
    server too, I think that the PHP-XML is too slow to work with lare
    amounts of data... so can you post me MXML, the XML, and the JAVA
    class file, with I will be able to send sql to mysql server and get
    the response?
    or FDS is a stand-alone SQL server?

    Flex is not a SQL server.
    The Flex SDK and compiler supports developing applications
    that run in the Flash player.
    Flex Data Services is deployed as a Java web application that
    simplifies integrating Flex clients with Java server-side resources
    (including interacting with SQL databases via Java).
    FlexBuilder is an IDE for developing Flex apps.
    I'd recommend spending some time browsing the Flex product
    area on adobe.com.
    Best,
    Seth

  • I can't connect to MySQL getting Error #2002 after I updated php

    I'm on a mac and I updated my version of PHP and installed the GD library.
    The problem is that I needed up date my connection to the database or something to that affect so I ran this command line:
    sudo mkdir /var/mysql
    sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
    And it worked... but then I restarted my computer and now I can't connect and I'm getting the error I had of...
    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
    So I tried the above two lines of code and it said those files/directory exist.
    I went into /etc/php.ini file to change this mysql.default_socket = /var/mysql/mysql.sock
    So what do I need to do here to change this permanently?

    Post Unix queries to the Unix forum under OS X Technologies.

  • Database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2) on mac os x 10.9.2

    Dear Fellas:
    I received "database error #2002 can not connect local mysql server to socket through '/var/run/mysqld/mysqld.sock'(2)" on mac os x 10.9.2.
    mysql info:
    ps -ef | grep mysql
        0    66     1   0 11:06AM ??         0:00.04 /bin/sh /usr/local/mysql/bin/mysqld_safe --user=mysql
       74   225    66   0 11:06AM ??         0:02.50 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.err --pid-file=/usr/local/mysql/data/Chuans-MacBook-Pro-2.local.pid --socket=/var/run/mysqld/mysqld.sock
      501   952   947   0  3:52PM ttys000    0:00.00 grep mysql
    Please help!!

    Fascinated and guessing:
    Something related to sock(2) because that's not part of your copied info. I'm thinking you've doubled up on sockets and the second socket doesn't exist, meaning you should be connecting to the first socket "mysqld.sock" whether automatic or not.
    I've only used GUI tools on purpose, so does this mean you've already got MySQL running and you tried to launch it again manually? Perhaps you already have one instance of a db and you're trying to launch a second instance, and the two can't coexist with a single user local db?
    Assuming this is all local, I'd shut down the db service and restart it, out of hand. I've seen similar messages when I set the db to start up on boot, and it didn't finish shutting down when I tried to restart it manually. Usually the GUI won't let me turn it on because it reports it's already running, but in that case it hadn't finished performing what the GUI was reporting.
    Just speculating.

  • PHP can't connect to MySQL socket

    Since upgrading from 10.4 to Leopard 10.5, PHP can no longer connect to MySQL. It gives the error:
    +Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'+
    I've read the threads and the following Technical Article:
    http://docs.info.apple.com/article.html?artnum=301457
    The problem is that none of the solutions are working!
    I can see that MySQL is creating a socket at:
    /tmp/mysql.sock
    1. So in /etc/apache2/httpd.config I set:
    mysql.default_socket = /tmp/mysql.sock
    But that had no effect, because even after restarting everything it still gives the above error message referring to /var/mysql/mysql.sock
    2. So then I followed the directions to have MySQL create the socket in the /var/mysql/mysql.sock. But any attempt to set the permissions on that directory has no effect or produces an 'unexpected error'.
    3. So then I tried creating an alias from /var/mysql/mysql.sock to /tmp/mysql.sock, but that had no effect either.
    Three possible solutions -- any one of which would solve the problem -- but all three of them fail, and the error message is always the same. What gives?

    Hi,
    I had the exactly the same problem after the 10.5 upgrade, I found following in another forum (seems to be pretty same as your solution 3, except for the mkdir command). After I applied these commands via the terminal window the MySQL worked with my PHP scripts (The PHP needed also some tweaking before working, but is not the issue here).
    ! first create the /var/mysql directory
    sudo mkdir /var/mysql/
    ! Then create the link
    sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    ! The restart apache (web sharing off and on in the sharing panel)
    Best regards,
    Sebastian

  • How can I include a MySQL table and records with the PUT of my Dreamweaver site?

    I am using .php to validate a user code against one of four codes that I am providing to potential clients.  They enter that code, along with a default user id and the appropriate page is then displayed for them.  Everything is working fine on the desktop.  I need to have this table and the records created on my remote server.  I tried saving the table in the Connections folder, but that didn't help.  Everytime I enter a code (valid or invalid) on the live site, I get the following message:  "Table 'boundsauctions_com.promocode' doesn't exist".  Is there someway to include the table and records in my Dreamweaver folders for the site? 
    Thanks for any help that you can offer.

    You can't.  Dreamweaver, or FTP for that matter has no connection to the MySQL database.  If you have created a MySQL database locally and now wish to move/copy it to your server you'll need to create a back up of your local database and then log into your database on the server and then restore that back up.
    An even easier way to do this, and if you are working with MySQL much at all  a good investement is to get the commercial version of Navicat MySQL - this is the best MySQL administrator I've found to date and is well worth the few bucks to buy it.  With Navicat you can connect to your local MySQL database and also create a connection to your remote database, then literally drag and drop your local database contents to copy them to your server. This function alone justifies buying Navicat. A huge time saver.   And no I do not work for or have any share or ties to Navicat.  I'd recommend something else if I knew of anything better, but so far I don't.
    Hope this helps. If you need any more details let me know.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    Shopping Cart for Adobe Dreamweaver
    available in PHP, ColdFusion
    Stay updated - http://blog.cartweaver.com

  • Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'

    I'm using the pre-installed versions of php and mysql under Mac OS X Server 10.4.4 running on a G4 and am unable to get anything involving mysql to work.
    I ssh to the server and enter various commands in Terminal:
    on typing "mysql" I get
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
    and on typing "mysqladmin version" I get
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
    On typing "sudo mysqld_safe" I get
    Starting mysqld daemon with databases from /var/mysql
    STOPPING server from pid file /var/mysql/MyServer.local.pid
    070722 16:06:05 mysqld ended
    /var/mysql/MyServer.local.err contains
    070722 16:06:04 mysqld started
    070722 16:06:04 [Warning] Setting lowercase_tablenames=2 because file system for /var/mysql/ is case insensitive
    070722 16:06:04 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    070722 16:06:05 InnoDB: Starting log scan based on checkpoint at
    InnoDB: log sequence number 0 43634.
    /var/mysql has permissions 775.
    The line
    mysql.default_socket = /var/mysql/mysql.sock
    is in /etc/php.ini
    whereis mysqladmin ->
    /usr/bin/mysqladmin
    whereis mysql ->
    /usr/bin/mysql
    ls /var/mysql ->
    MyServer.local.err
    ib_logfile1
    mysql
    ib_logfile0
    ibdata1
    test
    Can't find my.cnf or my.ini anywhere
    Can't find mysql.sock anywhere
    I'm trying to get a bug database running (mantis) under Mac OS X Server 10.4.4 that I can access from local clients.
    I'm trying to follow directions at http://www.mantisbugtracker.com/manual/manual.installation.php
    without knowing anything about mysql or php and I'm stuck on step 3:
    "Next we will create the necessary database tables and a basic configuration
    file."
    I get a message saying
    "Does administrative user have access to the database? ( Lost connection to MySQL server during query )"
    I don't even know if following the mantis directions has resulted in the creation of a database or not. Where would it be?
    Thanks for any help.
    Intel iMac   Mac OS X (10.4.10)  

    I've just done a clean install of OSX Server and added the latest MYSQL packaged installer. Afterwards I found the lock file in /private/tmp/mysql.lock
    The easiest way to solve this problem is to create a symbolic link so that the lock file appears to be in right place.
    e.g.
    cd /var
    sudo mkdir mysql <== this assumes the directory is missing
    cd mysql
    sudo ln -s /private/tmp/mysql.sock mysql.sock
    After this msql commands should work fine, and you've not fiddled with the security settings on users/groups.
    HTH
    Christian

  • Read from Oracle DB and Write to MySQL

    Hi All,
    I am fairly new to database administration, so please bear with me if this is something that is simple or not achievable at all -
    SetUp:
    I have an Oracle DB on one dedicated Server, to which I only have a read_only access.
    I have a MySQL database setup on a windows server 2008, both are on the company network and accessible to internal employees only.
    Problem Statement:
    I need to read certain tables from Oracle DB and push the records to MySQL database.
    I have a stored procedure which was doing this but from one Oracle Schema to another, which is running fine, now I need to use the same stored procedure but read from one database (Oracle) and write to another database (MySQL), is there a way to do this through the stored procedure, I know I can write a java program to do this, but need to do it through a stored procedure.
    Appreciate any help in this regards.

    c5b4a91d-d35a-43ba-ac96-6d1821541d33 wrote:
    Hi All,
    I am fairly new to database administration, so please bear with me if this is something that is simple or not achievable at all -
    SetUp:
    I have an Oracle DB on one dedicated Server, to which I only have a read_only access.
    I have a MySQL database setup on a windows server 2008, both are on the company network and accessible to internal employees only.
    Problem Statement:
    I need to read certain tables from Oracle DB and push the records to MySQL database.
    I have a stored procedure which was doing this but from one Oracle Schema to another, which is running fine, now I need to use the same stored procedure but read from one database (Oracle) and write to another database (MySQL), is there a way to do this through the stored procedure, I know I can write a java program to do this, but need to do it through a stored procedure.
    Appreciate any help in this regards.
    Start here:  http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_concepts.htm#i1007709

  • Need to write object to database but can't find useful examples

    Hi,
    Within one servlet I need to write an Attributes object to a database to be retrieved sometime later by a second servlet. All the examples of serialization code that I can find are for writing to serial or file streams. What I need is to be able to be able to write the Attributes object to a MySQL database. How do I get it into a form that I can write to the database and how do I once again turn in back into an object? I've not been able to answer those question from the examples I've found so far.
    Any help would be greatly appreciated.
    -- Rob

    There are at least two choices.
    1. Serialize to a ByteArrayOutputStream, base-64-encode that data, and save as a string in the database.
    2. Serialize directly to a database blob.

  • Can't connect to MySQL

    Hi all:
    I've set up a LAMP (Linux-Apache-MySQL-PHP of course) server
    and I'm getting the good old unidentified error when trying to
    connect. The Adobe technote gives a number of seemingly ambiguous
    reasons why this can happen. Has anyone else encountered this
    problem and if so what is the most common cause? I have a user set
    up for Dreamweaver in the MySQL database and I can connect wtih an
    admin program from the same computer. The error occurs just as I
    click test on the add connection dialog. I can supply more info but
    I'm so new at this I don't even know what's important. Any help
    would be greatly appreciated.
    Thanks!
    Ken Ha Quad

    IfyO wrote:
    > I begin to wonder if the makers of Dreamweaver8 intended
    to give
    > us all a Jigsaw puzzle.
    No, the makers of Dreamweaver give you software that works
    correctly
    with a properly configured setup.
    > How can Adobe sit bag and let us keep going through this
    stress?
    I agree that the setup documentation could be clearer, but
    most of the
    problems that I've encountered are the result of incorrect
    installation
    of PHP/MySQL. That's not Adobe's responsibility. The other
    main source
    of problems is failure to define a testing server correctly
    in the
    Dreamweaver site setup.
    > Following your suggestion, how does one determine a more
    uptodate library when
    > you have just installed the latest version of
    Dreamweaver 8 and EasyPHPserver?
    Dreamweaver 8 relies on a correctly configured installation
    of PHP and
    MySQL. It installs nothing that affects the performance of
    PHP or MySQL.
    Part of your problem may lie in using EasyPHP. I've just
    visited the
    EasyPHP site, and see that the latest version of EasyPHP uses
    PHP
    4.3.10, MySQL 4.1.9, and phpMyAdmin 2.6.1. The latest "real"
    versions
    are PHP 5.1.4, MySQL 5.0.22, and phpMyAdmin 2.8.
    There is a warning in the PHP manual that none of the
    "all-in-one"
    packages are endorsed by php.net. The fact that EasyPHP can't
    be
    bothered to update to more recent versions is one reason you
    shouldn't
    rely on such packages.
    > You still keep getting the error message that it cannot
    find MMHTTPDB which is
    > sitting clearly in the appropriate folders!!
    If it were sitting in the appropriate folder, Dreamweaver
    would find it.
    It sounds as though you haven't defined your testing server
    correctly.
    To start off with, the site files must be in the Apache
    server root. In
    the testing server definition, enter the location of the
    files in
    testing server folder, and the correct URL in URL prefix.
    On my setup, the Apache server root is C:\htdocs. So the
    correct
    settings for a site called "mysite" is as follows:
    Server model: PHP MySQL
    Access: Local/network
    Testing server folder: C:\htdocs\mysite\
    URL prefix:
    http://localhost/mysite/
    However, you may still have problems connecting to MySQL with
    EasyPHP,
    because it uses PHP 4.3 in combination with MySQL 4.1. You
    may need to
    set up your MySQL passwords using the OLD_PASSWORD protocol:
    http://dev.mysql.com/doc/refman/5.0/en/old-client.html
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • ERROR#: 2002 can't connect to MySQL server through socket '/var/mysql/mysql.sock'

    I was following this adobe article (
    http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html)
    to set up PHP and MySQL and connect a MySQL database to dreamweaver
    in Mac OS 10.4.8 and I kept getting:
    "Can't connect to MySQL server through socket
    '/var/mysql/mysql.sock' ERROR#: 2002".
    After a lot of searching I came across
    this
    article which said that there was an error in the PHP and MySQL
    connection or something.
    Anyway all I had to do was type (in a TERMINAL window):
    $ sudo mkdir /var/mysql
    $ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    and that fixed the problem, otherwise the adobe article
    worked very well.
    Check out the "this article" link to get the fix straight
    from the horse's mouth.

    I was following this adobe article (
    http://www.adobe.com/devnet/dreamweaver/articles/php_macintosh.html)
    to set up PHP and MySQL and connect a MySQL database to dreamweaver
    in Mac OS 10.4.8 and I kept getting:
    "Can't connect to MySQL server through socket
    '/var/mysql/mysql.sock' ERROR#: 2002".
    After a lot of searching I came across
    this
    article which said that there was an error in the PHP and MySQL
    connection or something.
    Anyway all I had to do was type (in a TERMINAL window):
    $ sudo mkdir /var/mysql
    $ sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
    and that fixed the problem, otherwise the adobe article
    worked very well.
    Check out the "this article" link to get the fix straight
    from the horse's mouth.

  • Can't connect to MySQL in DW CS5.5 on Win 7 Pro 64-bit...

    Hi there.
    I hope you can help me. I used Dreamweaver CS3 for some years on my former Windows XP Pro 32-bit laptop. Everything worked just fine with updating files to my webhotel and view my MySQL-databases within Dreamweaver. I use classic ASP and the MySQL 5.1/5.5 driver. Then a few months ago I upgraded to CS5.5, but everything still worked fine, as I were used to. BUT then I got a new laptop with Win 7 Pro 64-bit. I installed everything including all MySQL drivers, but I can't connect to my databases within Dreamweaver anymore. :-((( I get a connection error (Unable to retrieve tables from this connection, click on the 'Define...' button to test this connection.).
    Do note, that there's nothing wrong with my connectionstring. My webdatabases works just fine, but DW can't figure out to connect. Is it DW on Win 7 or is it a question about how to configure MySQL on my computer? I installed the full package from Sun/MySQL.
    I hope you can help me! It's so annoying that I can't use the feature to drag variables from my databases into my pages.
    Best regards
    Ulrich

    start at the top and work your way down applying applicable fixes until your problem is resolved.
    if cc (win):  https://helpx.adobe.com/creative-cloud/kb/creative-cloud-desktop-application-failed.html
    if, your error is:
    "Installer failed to initialize. File not found." or "Installer failed to initialize. This could be due to missing files."
    first, rename OOBE Folder to OOBE.old.
    to find OOBE:
    64 bit win OS: Program Files x86\Common Files\Adobe\OOBE
    32 bit win OS: Program Files \Common Files\Adobe\OOBE
    mac os: HD>library>application support>adobe>caps
    mac os: USER>library>application support>adobe>OOB
    if that fails or isn't the exact error you see, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall.
    if you're using a dvd to install:
    copy the disc contents to a desktop directory and install from that directory.
    if you're using a mac:
    1. Try to Create a new user account in Mac with Administrator Priviledges.
    2. Login to the New user, Navigate to Mac HD> Application> Utilities> Adobe Installer folder, Locate products like Adobe Reader, Adobe Flash, Adobe Air and un-install them
    3. Navigate to User Library> Application Support> Adobe and move Adobe to Trash.
    4. Navigate to Mac HD> Library> Application Support> Adobe and move Adobe to Trash.
    5. Start the installation again.
    if everything applicable above fails, check your installation logs:
    http://helpx.adobe.com/photoshop-elements/kb/troubleshoot-install-using-logs-elements.html

Maybe you are looking for

  • How do I use more than four PDOs when working with NI-Industr​ial Communicat​ions for CANopen?

    When I call CANopen TPDO Create.vi to create TPDO objects I can only input PDO1 through PDO4. How do I work with more than four PDOs? I see the other forum thread using an older version of CANopen, but it does not appear to directly translate into th

  • Bridge CC Thumbnails

    have one folder with only 65 Canon raw pictures in it. Whenever I go to this folder, it will generate 25 thumbnails (info at bottom left). Even when I just minimise the window and again maximise it. Have purged the thumbnail and also tried deleting t

  • IPhone5 Screen Freeze

    Hi all, This is my first post so I will try and be as clear as possible so hopefully someone will be able to assist. I have purchased an iPhone 5 (original so not S or C) for my girlfriend from Ebay which was refurbished by a reputable dealer. This i

  • Urgent ..please help asa possible

    hey SDNs, is it possible to   color to DATA Display without using exception value. i have a data display and want to change the color of  two perticular columns so that they will become easy to read. any help in this respect will be rewarded .. Thx A

  • My smart playlists are duplicating songs

    I have my smart playlist set to live update and include anothing with a media kind that is music. The playlist is duplicating certain, but not all, purchased songs on that playlist but is only doing so on my iPhone. On my computer the playlists list