📄 mysqli.change-user.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Changes the user of the specified database connection</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mysqli.autocommit.html">mysqli::autocommit</a></div> <div class="next" style="text-align: right; float: right;"><a href="mysqli.character-set-name.html">mysqli::character_set_name</a></div> <div class="up"><a href="class.mysqli.html">MySQLi</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="mysqli.change-user" class="refentry"> <div class="refnamediv"> <h1 class="refname">mysqli::change_user</h1> <h1 class="refname">mysqli_change_user</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">mysqli::change_user</span> -- <span class="refname">mysqli_change_user</span> — <span class="dc-title">Changes the user of the specified database connection</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <p class="para">Object oriented style (method):</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>mysqli::change_user</b></b></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$user</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$password</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$database</tt></span> )</div> <p class="para rdfs-comment">Procedural style:</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><b><b>mysqli_change_user</b></b></span> ( <span class="methodparam"><span class="type"><a href="class.mysqli.html" class="type mysqli">mysqli</a></span> <tt class="parameter">$link</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$user</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$password</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$database</tt></span> )</div> <p class="para rdfs-comment"> Changes the user of the specified database connection and sets the current database. </p> <p class="para"> In order to successfully change users a valid <i><tt class="parameter">username</tt></i> and <i><tt class="parameter">password</tt></i> parameters must be provided and that user must have sufficient permissions to access the desired database. If for any reason authorization fails, the current user authentication will remain. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt><span class="term"><i><tt class="parameter">link</tt></i></span><dd><p class="para">Procedural style only: A link identifierreturned by <a href="mysqli.connect.html" class="function">mysqli_connect()</a> or <a href="mysqli.init.html" class="function">mysqli_init()</a></p></dd></dt> <dt> <span class="term"><i><tt class="parameter">user</tt></i></span> <dd> <p class="para"> The MySQL user name. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">password</tt></i></span> <dd> <p class="para"> The MySQL password. </p> </dd> </dt> <dt>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -