<p dir="auto"><strong>Describe the bug</strong><br>
Use MSSQL, the password contains @, the error shows <code class="notranslate">Failed to execute migrations to revision 12685bc9edf4. (pyodbc.OperationalError) ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')</code> when using sqlalchemy; while the connection is successful by using sql client.</p>
<p dir="auto"><strong>To Reproduce</strong><br>
Configure password contains @</p>
<p dir="auto"><strong>Error</strong><br>
After checked recent commits, the issue should be introduced by this commit: <a class="commit-link" href="https://github.com/sqlalchemy/sqlalchemy/commit/2ab67552a097522a82fd250b8b36995a9bc2cd80#diff-f54587482b075b6a76ecbf10620b5183d65f9449639606d8fa88a103d88a95b6L705-R705"><tt>2ab6755</tt>#diff-f54587482b075b6a76ecbf10620b5183d65f9449639606d8fa88a103d88a95b6L705-R705</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Log output.
Failed to execute migrations to revision 12685bc9edf4. (pyodbc.OperationalError) ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')"><pre class="notranslate"><code class="notranslate"># Log output.
Failed to execute migrations to revision 12685bc9edf4. (pyodbc.OperationalError) ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')
</code></pre></div>
<p dir="auto"><strong>Versions.</strong></p>
<ul dir="auto">
<li>OS: ubuntu 20.04</li>
<li>Python: 3.7.4</li>
<li>SQLAlchemy: 1.4.18</li>
<li>Database: MSSQL</li>
<li>DBAPI: pyodbc</li>
</ul>
<p dir="auto"><strong>Additional context</strong><br>
E.g. use password Abcdef1@, the server parameter is @, while password is Abcdef1</p>
<p dir="auto"><strong>Have a nice day!</strong></p>
<p dir="auto"><strong>Describe the bug</strong><br>
When a password contains a <code class="notranslate">@</code> character.  Sqlalchemy with a string url cannot connect to the database.</p>
<p dir="auto">I greatly suspect that it was induced by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="891509156" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/6482" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/6482/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/6482">#6482</a>.</p>
<p dir="auto">Was working fine in 1.4.15.</p>
<p dir="auto"><strong>To Reproduce</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    url = (
        &quot;mssql+pyodbc://&quot;
        &quot;SA:P@my_password@127.0.0.1:1433/master&quot;
        &quot;?driver=ODBC Driver 17 for SQL Server&quot;
    )"><pre class="notranslate">    <span class="pl-s1">url</span> <span class="pl-c1">=</span> (
        <span class="pl-s">"mssql+pyodbc://"</span>
        <span class="pl-s">"SA:P@my_password@127.0.0.1:1433/master"</span>
        <span class="pl-s">"?driver=ODBC Driver 17 for SQL Server"</span>
    )</pre></div>
<p dir="auto"><strong>Error</strong><br>
``<br>
sqlalchemy.exc.OperationalError: (pyodbc.OperationalError) ('HYT00', '[HYT00] [Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired (0) (SQLDriverConnect)')</p>
<p dir="auto">``</p>
<p dir="auto"><strong>Versions.</strong></p>
<ul dir="auto">
<li>OS:</li>
<li>Python: 3.8</li>
<li>SQLAlchemy: 1.4.17</li>
<li>Database: mssql</li>
<li>DBAPI: pyodbc</li>
</ul>
<p dir="auto"><strong>Have a nice day!</strong></p>