Re: Crash course

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Lester

Just try to connect to your mysqlserver using a simple php script first.

Example for MySqli:
http://www.php.net/manual/en/mysqli.construct.php#example-1625

Example for MySql:
http://www.php.net/manual/en/function.mysql-connect.php#refsect1-function.mysql-connect-examples

If you still use MySql and not MySqli to connect to your MySql-Server:
Please keep in mind, that this extension is about to die out.

I just know of mysqli and mysql that you can chosse in the
Joomla-Installation process ...
PHP itself does also have PDO. There you have to check first if the
pdo-driver for mysql is installed:
http://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php
And then try to connect to your server:
http://de2.php.net/manual/en/pdo.construct.php#refsect1-pdo.construct-examples

If you're using MySqli, please try a prepared-statement as well.
http://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php
I got access to a server where the administrator had mixed it up that
hard, that mysqli as PHP-extension was installed and worked quite well
excepted by the prepared-statement :D

Bye
Simon

On Mon, Aug 20, 2012 at 12:51 PM, Lester Caine <lester@xxxxxxxxxxx> wrote:
>
> OK - MySQL is not an area I've had to bother with, but I'm trying to sort
> out a tranche of websites that 1&1 messed up the DNS on last week and we
> have take over support for. All the databases have backed up and been
> restored ... although after Firebird's backup and restore system having to
> dump the database as raw SQL ... that took a LONG time :(
>
> Anyway I've installed the mysqli driver and that seems to be working and
> I've run 'test connection' in mysql workbench with what I think are the same
> settings in the  joomla without a problem, but the website just gives
> "Database connection error (2): Could not connect to MySQL." I can browse
> the data in workbench, and changing user admin enables and disables that,
> but nothing seems to sort the php connection.
>
> Can anybody think of something that I have missed in this or point me to a
> suitable 'newbie' guide to debugging mysql connections so I can get all
> these sites back on line again ... If it was Firebird I'd just have mirrored
> of one of my other machines and been working as the security stuff is
> managed in the database, by mysql seems to have layers of security that I'm
> missing somewhere ;)
>
> --
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux