1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Create database failed

Discussion in 'Databases' started by tasos55, Sep 8, 2013.

  1. #1
    Hello there !

    I need some help with database i cant create a new database, i donwloaded the latest version of phpmyadmin, phpmyadmin has already:
    information_schema and test in it.
    I try to do this:
    CREATE DATABASE IF NOT EXISTS `demo` ;
    but i get an error: #1044 - Access denied for user ''@'localhost' to database 'demo'

    Here below server information

    erver: localhost via TCP/IP
    Server type: MySQL
    Server version: 5.6.12-log - MySQL Community Server (GPL)
    Protocol version: 10
    User: admin@localhost
    Server charset: UTF-8 Unicode (utf8)
    Web server
    
    Apache/2.4.4 (Win64) PHP/5.4.12
    Database client version: libmysql - mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $
    PHP extension: mysqli Documentation
    phpMyAdmin
    
    Version information: 4.0.4, latest stable version: 4.0.6
    Documentation
    Wiki
    Official Homepage
    Contribute
    Get support
    List of changes
    Code (markup):
    I realy dont know hot to solve the problem. Thanks in advance
     
    tasos55, Sep 8, 2013 IP
  2. Code Developer

    Code Developer Active Member

    Messages:
    48
    Likes Received:
    2
    Best Answers:
    2
    Trophy Points:
    58
    #2
    Its because you the user doesn't not authorize to use the db.Either create one or use default user details.Mostly :

    User : root
    Password : Don't use any password(leave it blank)
     
    Code Developer, Sep 8, 2013 IP
  3. Krnl

    Krnl Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Check out "How do I add users to MySQL?" http://krnlpanic.com/wp/mysql-installation-and-faq/

    You can use the root user to create the database, but you'll want to create an unprivileged user and grant specific access to the database. Make sure to execute flush privileges after each user modification, or it won't work.
     
    Krnl, Sep 24, 2013 IP