Yii Framework Forum: Troubles w/ MySQL and MAMP - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Troubles w/ MySQL and MAMP Rate Topic: -----

#1 User is offline   pschamber 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 09-December 08

Posted 09 December 2008 - 11:10 PM

So.. I've been trying to run through the example application, but I cannot seem to get the User model generated. I've noticed that a few others have had troubles because they are running php through MAMP; however, I seem to be running into a completely different error from those of everyone else.

Here is the error I receive:

model User
>> exception 'CDbException' with message 'CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet' in /Applications/MAMP/htdocs/YiiTesting/framework/db/CDbCommand.php:284
Stack trace:
#0 /Applications/MAMP/htdocs/YiiTesting/framework/db/CDbCommand.php(231): CDbCommand->queryInternal('fetch', 2)
#1 /Applications/MAMP/htdocs/YiiTesting/framework/db/schema/mysql/CMysqlSchema.php(165): CDbCommand->queryRow()
#2 /Applications/MAMP/htdocs/YiiTesting/framework/db/schema/mysql/CMysqlSchema.php(68): CMysqlSchema->findConstraints(Object(CMysqlTableSchema))
#3 /Applications/MAMP/htdocs/YiiTesting/framework/db/schema/CDbSchema.php(72): CMysqlSchema->createTable('User')
#4 /Applications/MAMP/htdocs/YiiTesting/framework/cli/commands/shell/ModelCommand.php(95): CDbSchema->getTable('User')
#5 [internal function]: ModelCommand->generateModel('/Applications/M...', Array)
#6 /Applications/MAMP/htdocs/YiiTesting/framework/console/CConsoleCommand.php(116): call_user_func(Array, '/Applications/M...', Array)
#7 /Applications/MAMP/htdocs/YiiTesting/framework/cli/commands/shell/ModelCommand.php(72): CConsoleCommand->copyFiles(Array)
#8 /Applications/MAMP/htdocs/YiiTesting/framework/cli/commands/ShellCommand.php(98): ModelCommand->run(Array)
#9 /Applications/MAMP/htdocs/YiiTesting/framework/cli/commands/ShellCommand.php(78): ShellCommand->runShell()
#10 /Applications/MAMP/htdocs/YiiTesting/framework/console/CConsoleCommandRunner.php(62): ShellCommand->run(Array)
#11 /Applications/MAMP/htdocs/YiiTesting/framework/console/CConsoleApplication.php(88): CConsoleCommandRunner->run(Array)
#12 /Applications/MAMP/htdocs/YiiTesting/framework/base/CApplication.php(146): CConsoleApplication->processRequest()
#13 /Applications/MAMP/htdocs/YiiTesting/framework/yiic.php(30): CApplication->run()
#14 /Applications/MAMP/htdocs/YiiTesting/framework/yiic(15): require_once('/Applications/M...')
#15 {main}



I've tried everything I could think of to get this working, but I'm stumped.
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,902
  • Joined: 04-October 08
  • Location:DC, USA

Posted 09 December 2008 - 11:24 PM

This might be caused by the MySQL version you installed.
Try the following:
in your config.php, set 'emulatePrepare'=>true for the 'db' component.
0

#3 User is offline   pschamber 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 09-December 08

Posted 09 December 2008 - 11:30 PM

Alright! That was an easy enough fix. What version of MySQL should I be running to prevent this in the future?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users