$ mysql -u root -p
2. Switch to the mysql database:
mysql> use mysql;
3. Change password for user root, enter:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
4. Reset the privileges:
mysql> flush privileges;
$ mysql -u root -p
mysql> use mysql;
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
mysql> flush privileges;
> Fatal error: Call to undefined function Symfony\Component\Form\Extension\Core\DataTransformer\intl_is_failure()
$loader->registerPrefixFallbacks(array( __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs', ));
require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
<?php /** * my description * @package foo */ define('foo','foo');
<?php /** * this is a file description * @package foo */ class foo{
<?php /** * this is a file description * without @package */ ... some code ...
likeability(x) = ( usefulness(x)^2 - difficulty(x)^2)^1/2
/** * This is the standard example found at * http://http://symfony.com/doc/2.0/bundles/DoctrineFixturesBundle/ * With a few comments added **/ class LoadUserData implements FixtureInterface { public function load(ObjectManager $manager) { // this is a typical approach // to making a doctrine fixture $userAdmin = new User(); $userAdmin->setUsername('admin'); $userAdmin->setPassword('test'); $manager->persist($userAdmin); $manager->flush(); $this->addReference('admin-user', $userAdmin); // but, if you try this approach $userAdmin2 = new \genericUserClass(); // not a doctrine entity, not namespaced $userAdmin2->setName('admin'); $userAdmin2->setPassword('test'); $userAdmin2->saveUsingSomeCustomMethod(); $this->addReference('admin-user-2', $userAdmin2); // NOPE! ERROR! } }
class LoadUserData implements OrderedFixtureInterface,ContainerAwareInterface { public function load(ObjectManager $manager) { $userAdmin2 = new \genericUserClass(); // not a doctrine entity $userAdmin2->setName('admin'); $userAdmin2->setPassword('test'); $userAdmin2->saveUsingSomeCustomMethod(); $doctrineUserAdmin2 = $manager->getRepository("CoreBundle:UserClass") ->findById($userdmin2->getId()); $this->addReference('admin-user-2', $doctrineUserAdmin2 ); } }