new problem at the DatabaseConfig.php stage

Ask your questions regarding TimeTrex installation here.
Locked
satish
Posts: 9
Joined: Thu Jan 04, 2007 3:08 am

new problem at the DatabaseConfig.php stage

Post by satish »

hi evry1

when i open http://localhost/timetrex/interface/ins ... Config.php... fill in the details and click 'Next' it threw up errors. i refreshed the page and still a page with these errors.

--------------------------------------------------------------------------------
(mysqlt): select version()
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): CREATE DATABASE TimeTrex
--------------------------------------------------------------------------------
1007: Can't create database 'timetrex'; database exists

ADOConnection._Execute(CREATE DATABASE TimeTrex, false) % line 861, file: adodb.inc.php
ADOConnection.Execute(CREATE DATABASE TimeTrex) % line 269, file: adodb-datadict.inc.php
ADODB_DataDict.ExecuteSQLArray(Array[1]) % line 274, file: Install.class.php
Install.createDatabase(TimeTrex) % line 112, file: DatabaseConfig.php


Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1007: Can't create database 'timetrex'; database exists] in EXECUTE("CREATE DATABASE TimeTrex") ' in C:\timetrex\classes\adodb\adodb-exceptions.inc.php:78 Stack trace: #0 C:\timetrex\classes\adodb\adodb.inc.php(886): adodb_throw('mysqlt', 'EXECUTE', 1007, 'Can't create da...', 'CREATE DATABASE...', false, Object(ADODB_mysqlt)) #1 C:\timetrex\classes\adodb\adodb.inc.php(861): ADOConnection->_Execute('CREATE DATABASE...', false) #2 C:\timetrex\classes\adodb\adodb-datadict.inc.php(269): ADOConnection->Execute('CREATE DATABASE...') #3 C:\timetrex\classes\modules\install\Install.class.php(274): ADODB_DataDict->ExecuteSQLArray(Array) #4 C:\timetrex\interface\install\DatabaseConfig.php(112): Install->createDatabase('TimeTrex') #5 {main} thrown in C:\timetrex\classes\adodb\adodb-exceptions.inc.php on line 78
[04-Jan-2007 22:15:28] PHP Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1007: Can't create database 'timetrex'; database exists] in EXECUTE("CREATE DATABASE TimeTrex")
' in C:\timetrex\classes\adodb\adodb-exceptions.inc.php:78
Stack trace:
#0 C:\timetrex\classes\adodb\adodb.inc.php(886): adodb_throw('mysqlt', 'EXECUTE', 1007, 'Can't create da...', 'CREATE DATABASE...', false, Object(ADODB_mysqlt))
#1 C:\timetrex\classes\adodb\adodb.inc.php(861): ADOConnection->_Execute('CREATE DATABASE...', false)
#2 C:\timetrex\classes\adodb\adodb-datadict.inc.php(269): ADOConnection->Execute('CREATE DATABASE...')
#3 C:\timetrex\classes\modules\install\Install.class.php(274): ADODB_DataDict->ExecuteSQLArray(Array)
#4 C:\timetrex\interface\install\DatabaseConfig.php(112): Install->createDatabase('TimeTrex')
#5 {main}
thrown in C:\timetrex\classes\adodb\adodb-exceptions.inc.php on line 78

the php error log shows...

[04-Jan-2007 22:15:28] PHP Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1007: Can't create database 'timetrex'; database exists] in EXECUTE("CREATE DATABASE TimeTrex")
' in C:\timetrex\classes\adodb\adodb-exceptions.inc.php:78
Stack trace:
#0 C:\timetrex\classes\adodb\adodb.inc.php(886): adodb_throw('mysqlt', 'EXECUTE', 1007, 'Can't create da...', 'CREATE DATABASE...', false, Object(ADODB_mysqlt))
#1 C:\timetrex\classes\adodb\adodb.inc.php(861): ADOConnection->_Execute('CREATE DATABASE...', false)
#2 C:\timetrex\classes\adodb\adodb-datadict.inc.php(269): ADOConnection->Execute('CREATE DATABASE...')
#3 C:\timetrex\classes\modules\install\Install.class.php(274): ADODB_DataDict->ExecuteSQLArray(Array)
#4 C:\timetrex\interface\install\DatabaseConfig.php(112): Install->createDatabase('TimeTrex')
#5 {main}
thrown in C:\timetrex\classes\adodb\adodb-exceptions.inc.php on line 78

however in mysql, a db named timetrex has already been created.

what to do now?

thanx,
satish
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Delete the timetrex database and try again.
satish
Posts: 9
Joined: Thu Jan 04, 2007 3:08 am

Post by satish »

tried that too... doesnt work yet. deleted the db frm mysql and run the same page again... same error :(

satish
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

If you are getting the exact same error then you didn't delete it properly, or the TimeTrex user doesn't have permissions to create databases. Try using a different database name, like "timetrex01", see if that works.
satish
Posts: 9
Joined: Thu Jan 04, 2007 3:08 am

Post by satish »

hi

i dropped the table from mysql and then navigated to...
http://localhost/timetrex/interface/ins ... Config.php

Debug Buffer
============================================================================
Memory Usage: N/A
----------------------------------------------------------------------------
DEBUG [135]: [Function](): URI: /timetrex/interface/install/DatabaseConfig.php?data%5Btype%5D=mysqlt&data%5Bhost%5D=SATISH&data%5Bdatabase_name%5D=TimeTrexDB&data%5Buser%5D=TimeTrex&data%5Bpassword%5D=TimeTrex_pwd&data%5Bpriv_user%5D=root&data%5Bpriv_password%5D=casatyam2000&action=Test+Connection
DEBUG [137]: [Function](): Production: 1
DEBUG [92]: TTDate::setTimeZone(): Setting TimeZone: PST8PDT
DEBUG [49]: [Function](): Bypassing Authentication
DEBUG [67]: Install::isInstallMode(): Install Mode is ON
DEBUG [236]: Install::checkDatabaseExists(): Database Name: TimeTrexDB
DEBUG [250]: Install::checkDatabaseExists(): Does not Exist - Database Name: TimeTrexDB
DEBUG [141]: [Function](): Testing connection as priv user
DEBUG [93]: URLBuilder::getURL(): URL Values: v=1.4.0S&page=database_config&priv_user=root
DEBUG [109]: URLBuilder::getURL(): URL: pre_install.php?v=1.4.0S&page=database_config&priv_user=root
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 0.0000 ms (0.00 %) unprofiled

1137.7659 ms (100.00 %) Missed
============================================================================
1137.7659 ms (100.00 %) OVERALL TIME
============================================================================

php error log shows...

[07-Jan-2007 20:01:30] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 5.7.1 Unable to relay for root@localhost in C:\timetrex\classes\modules\core\Debug.class.php on line 166

clicked 'test connection'...

Debug Buffer
============================================================================
Memory Usage: N/A
----------------------------------------------------------------------------
DEBUG [135]: [Function](): URI: /timetrex/interface/install/DatabaseConfig.php?data%5Btype%5D=mysqlt&data%5Bhost%5D=SATISH&data%5Bdatabase_name%5D=TimeTrexDB&data%5Buser%5D=TimeTrex&data%5Bpassword%5D=TimeTrex_pwd&data%5Bpriv_user%5D=root&data%5Bpriv_password%5D=casatyam2000&action=Test+Connection
DEBUG [137]: [Function](): Production: 1
DEBUG [92]: TTDate::setTimeZone(): Setting TimeZone: PST8PDT
DEBUG [49]: [Function](): Bypassing Authentication
DEBUG [67]: Install::isInstallMode(): Install Mode is ON
DEBUG [236]: Install::checkDatabaseExists(): Database Name: TimeTrexDB
DEBUG [250]: Install::checkDatabaseExists(): Does not Exist - Database Name: TimeTrexDB
DEBUG [141]: [Function](): Testing connection as priv user
DEBUG [93]: URLBuilder::getURL(): URL Values: v=1.4.0S&page=database_config&priv_user=root
DEBUG [109]: URLBuilder::getURL(): URL: pre_install.php?v=1.4.0S&page=database_config&priv_user=root
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 0.0000 ms (0.00 %) unprofiled

1138.8090 ms (100.00 %) Missed
============================================================================
1138.8090 ms (100.00 %) OVERALL TIME
============================================================================

php error log shows...

[07-Jan-2007 20:02:29] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 5.7.1 Unable to relay for root@localhost in C:\timetrex\classes\modules\core\Debug.class.php on line 166

on clicking 'next'...

Debug Buffer
============================================================================
Memory Usage: N/A
----------------------------------------------------------------------------
DEBUG [135]: [Function](): URI: /timetrex/interface/install/DatabaseConfig.php?data%5Btype%5D=mysqlt&data%5Bhost%5D=SATISH&data%5Bdatabase_name%5D=TimeTrexDB&data%5Buser%5D=TimeTrex&data%5Bpassword%5D=TimeTrex_pwd&data%5Bpriv_user%5D=root&data%5Bpriv_password%5D=casatyam2000&action=Next
DEBUG [137]: [Function](): Production: 1
DEBUG [92]: TTDate::setTimeZone(): Setting TimeZone: PST8PDT
DEBUG [49]: [Function](): Bypassing Authentication
DEBUG [67]: Install::isInstallMode(): Install Mode is ON
DEBUG [97]: [Function](): Next
DEBUG [236]: Install::checkDatabaseExists(): Database Name: TimeTrexDB
DEBUG [250]: Install::checkDatabaseExists(): Does not Exist - Database Name: TimeTrexDB
DEBUG [111]: [Function](): Creating Database
DEBUG [255]: Install::createDatabase(): Database Name: TimeTrexDB
DEBUG [269]: Install::createDatabase(): Attempting to Create Database...
DEBUG [236]: Install::checkDatabaseExists(): Database Name: TimeTrexDB
DEBUG [250]: Install::checkDatabaseExists(): Does not Exist - Database Name: TimeTrexDB
DEBUG [128]: [Function](): zDatabase does not exist.
DEBUG [93]: URLBuilder::getURL(): URL Values: v=1.4.0S&page=database_config&priv_user=
DEBUG [109]: URLBuilder::getURL(): URL: pre_install.php?v=1.4.0S&page=database_config&priv_user=
============================================================================

============================================================================
PROFILER OUTPUT
============================================================================
Calls Time Routine
-----------------------------------------------------------------------------
1 0.0000 ms (0.00 %) unprofiled

1221.5922 ms (100.00 %) Missed
============================================================================
1221.5922 ms (100.00 %) OVERALL TIME
============================================================================

php error log shows...

[07-Jan-2007 20:04:12] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 5.7.1 Unable to relay for root@localhost in C:\timetrex\classes\modules\core\Debug.class.php on line 166

what to do now?

thanx
satish
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

DEBUG [255]: Install::createDatabase(): Database Name: TimeTrexDB
DEBUG [269]: Install::createDatabase(): Attempting to Create Database...
DEBUG [236]: Install::checkDatabaseExists(): Database Name: TimeTrexDB
DEBUG [250]: Install::checkDatabaseExists(): Does not Exist - Database Name: TimeTrexDB
It still can't create the database. Take a look at this FAQ entry:

http://forums.timetrex.com/viewtopic.php?t=65
satish
Posts: 9
Joined: Thu Jan 04, 2007 3:08 am

Post by satish »

mysql> GRANT ALL PRIVILEGES ON *.* TO 'TimeTrex'@'localhost' IDENTIFIED BY 'Time
Trex_Pwd' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> create database TimeTrex;
Query OK, 1 row affected (0.00 sec)

mysql> mysql -u TimeTrex -pTimeTrex_Pwd TimeTrex
->

this is all that happens! is this the right thing?

regards,
satish
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

satish wrote:mysql> GRANT ALL PRIVILEGES ON *.* TO 'TimeTrex'@'localhost' IDENTIFIED BY 'Time
Trex_Pwd' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)

mysql> create database TimeTrex;
Query OK, 1 row affected (0.00 sec)

mysql> mysql -u TimeTrex -pTimeTrex_Pwd TimeTrex
->

this is all that happens! is this the right thing?

regards,
satish
After you create the database you need to type "quit" before you try running the MySQL console again with: mysql -u TimeTrex -pTimeTrex_Pwd TimeTrex
satish
Posts: 9
Joined: Thu Jan 04, 2007 3:08 am

Post by satish »

after creating the DB, i typed quit and the console closed. then again i logged in and...

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.27-community-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> mysql -u TimeTrex -pTimeTrex_Pwd TimeTrex
->
->

now this is what i get when i click [next] on databaseconfig.php

(mysqlt): select version()
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysqlt): CREATE DATABASE TimeTrex
--------------------------------------------------------------------------------
1007: Can't create database 'timetrex'; database exists

ADOConnection._Execute(CREATE DATABASE TimeTrex, false) % line 861, file: adodb.inc.php
ADOConnection.Execute(CREATE DATABASE TimeTrex) % line 269, file: adodb-datadict.inc.php
ADODB_DataDict.ExecuteSQLArray(Array[1]) % line 274, file: Install.class.php
Install.createDatabase(TimeTrex) % line 112, file: DatabaseConfig.php


Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1007: Can't create database 'timetrex'; database exists] in EXECUTE("CREATE DATABASE TimeTrex") ' in C:\timetrex\classes\adodb\adodb-exceptions.inc.php:78 Stack trace: #0 C:\timetrex\classes\adodb\adodb.inc.php(886): adodb_throw('mysqlt', 'EXECUTE', 1007, 'Can't create da...', 'CREATE DATABASE...', false, Object(ADODB_mysqlt)) #1 C:\timetrex\classes\adodb\adodb.inc.php(861): ADOConnection->_Execute('CREATE DATABASE...', false) #2 C:\timetrex\classes\adodb\adodb-datadict.inc.php(269): ADOConnection->Execute('CREATE DATABASE...') #3 C:\timetrex\classes\modules\install\Install.class.php(274): ADODB_DataDict->ExecuteSQLArray(Array) #4 C:\timetrex\interface\install\DatabaseConfig.php(112): Install->createDatabase('TimeTrex') #5 {main} thrown in C:\timetrex\classes\adodb\adodb-exceptions.inc.php on line 78

the php error log shows...

[08-Jan-2007 19:51:35] PHP Warning: mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: Can't connect to MySQL server on 'localhost' (10061) in C:\timetrex\classes\adodb\drivers\adodb-mysql.inc.php on line 376
[08-Jan-2007 19:51:35] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 550 5.7.1 Unable to relay for root@localhost in C:\timetrex\classes\modules\core\Debug.class.php on line 166
[08-Jan-2007 19:55:22] PHP Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1007: Can't create database 'timetrex'; database exists] in EXECUTE("CREATE DATABASE TimeTrex")
' in C:\timetrex\classes\adodb\adodb-exceptions.inc.php:78
Stack trace:
#0 C:\timetrex\classes\adodb\adodb.inc.php(886): adodb_throw('mysqlt', 'EXECUTE', 1007, 'Can't create da...', 'CREATE DATABASE...', false, Object(ADODB_mysqlt))
#1 C:\timetrex\classes\adodb\adodb.inc.php(861): ADOConnection->_Execute('CREATE DATABASE...', false)
#2 C:\timetrex\classes\adodb\adodb-datadict.inc.php(269): ADOConnection->Execute('CREATE DATABASE...')
#3 C:\timetrex\classes\modules\install\Install.class.php(274): ADODB_DataDict->ExecuteSQLArray(Array)
#4 C:\timetrex\interface\install\DatabaseConfig.php(112): Install->createDatabase('TimeTrex')
#5 {main}
thrown in C:\timetrex\classes\adodb\adodb-exceptions.inc.php on line 78

regards,
satish
Locked