PHP and MySQL

Discussion in 'Programming' started by AimyThomas, Sep 6, 2012.

Thread Status:
Not open for further replies.
  1. AimyThomas

    AimyThomas Banned

    Joined:
    Aug 28, 2012
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    While I was interpretation the PHP manual on database security the recent past, it said that you should by no means connect to the database as the super user but rather as one more user with more limited options.
    My question is:
    How do you generate new users and set access levels for them in MySQL?

    Secondly, if a website does not offer PHP Admin, how can I use a database I created in phpMyAdmin on my PC for that website?

    Thank in Advance
     
  2. anthonyemuobo

    anthonyemuobo New Member

    Joined:
    Mar 25, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Generating User is easy with MySQL as it is easy in phpmyadmin. The format for creating users is:

    CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';

    and after creating the user we use to the below syntax to grant privileges.

    GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';

    Hope this helps.
     
  3. todd12345

    todd12345 New Member

    Joined:
    Sep 30, 2015
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.
    MySQL is a freely available open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). SQL is the most popular language for adding, accessing and managing content in a database. It is most noted for its quick processing, proven reliability, ease and flexibility of use.
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice